# |
Jul 6th 2018, 11:05 |
wYm |
hi all, how can I remove prefix on cakephp 3 with the function build of the Url helper, before it was with _prefix param |
# |
Jul 6th 2018, 10:58 |
skor |
:+1: |
# |
Jul 6th 2018, 10:57 |
okelet |
that's a good idea... in my case I only need the username, for auditing the error, so I will save it as a session variable, thanks!!! |
# |
Jul 6th 2018, 10:56 |
skor |
I see that the ‘Controller.beforeRedirect’ is called before redirecting, in Cake\Controller\Controller, should I be using that? |
# |
Jul 6th 2018, 10:51 |
skor |
Juan, I keep a Singleton of the session data, populated after the auth in appcontroller, then I can `use` it anywhere. |
# |
Jul 6th 2018, 10:50 |
skor |
hi everyone! $this->response = $this->response->withCookie(‘userId’, [ ‘value’ => $currentUserId, ... ]); // but then I $this->redirect($this->Auth->redirectUrl()) // no cookie gets set, should I be using: // return $this->response->withHeader(‘Location’, $this->Auth->redirectUrl()); ? cake 3.4 thanks! |
# |
Jul 6th 2018, 10:31 |
okelet |
hi, does someone know if i can access the current logged user from an error handler? searching google and github without success.... |
# |
Jul 6th 2018, 10:20 |
james.phillips |
place |
# |
Jul 6th 2018, 10:20 |
james.phillips |
@bravo-kernel thanks for looking into it and for the code in the first palce |
# |
Jul 6th 2018, 10:19 |
bravo-kernel |
so I don't misinform people ;) |
# |
Jul 6th 2018, 10:19 |
bravo-kernel |
@james.phillips no problem and it's interesting anyway. I just want to make sure I get the expectations clear |
# |
Jul 6th 2018, 10:12 |
k4t |
thank you! |
# |
Jul 6th 2018, 10:11 |
lorenzo |
`through($collection) use ($purchaseType) { return $collection->sortBy($callback, $sortOrder); })` |
# |
Jul 6th 2018, 10:11 |
lorenzo |
use the `through()` function for that |
# |
Jul 6th 2018, 10:09 |
k4t |
I just thinked about something like this ;p |
# |
Jul 6th 2018, 10:09 |
k4t |
File uploaded https://cakesf.slack.com/files/U0TD082KF/FBK9XP6RW/sort.php / https://slack-files.com/T053DPNCM-FBK9XP6RW-e68b05c868 |
# |
Jul 6th 2018, 10:09 |
k4t |
hmmm |
# |
Jul 6th 2018, 10:08 |
lorenzo |
that would not make much sense, would it? |
# |
Jul 6th 2018, 10:08 |
lorenzo |
no |
# |
Jul 6th 2018, 10:08 |
k4t |
not via sortBy parameter |
# |
Jul 6th 2018, 10:07 |
k4t |
@lorenzo is it possible to change SORT ORDER in sortBy callback function? |
# |
Jul 6th 2018, 10:05 |
iqu |
view uses datepicker |
# |
Jul 6th 2018, 10:03 |
iqu |
easy way would be just to change all in $this->request->getData(); array |
# |
Jul 6th 2018, 10:02 |
iqu |
have many date coming from view in format: 'effective_from' => '20-12-2018', Best wayt to convert into something that date object accepts? |
# |
Jul 6th 2018, 09:41 |
josbeir |
right... |
# |
Jul 6th 2018, 09:41 |
braeden |
because the performance grinds to a halt when using secondary indexes (i.e. querying a bunch of records by a non-primary key) |
# |
Jul 6th 2018, 09:41 |
braeden |
You can't do any of the nice things that you can do with MySQL/SQL |
# |
Jul 6th 2018, 09:40 |
josbeir |
sql users feel right at home it seems |
# |
Jul 6th 2018, 09:40 |
josbeir |
not bad |
# |
Jul 6th 2018, 09:39 |
braeden |
but the DML is very restrictive |
# |
Jul 6th 2018, 09:39 |
braeden |
or Elastic, so can't say |
# |
Jul 6th 2018, 09:39 |
braeden |
I haven't really fiddled with Mongo |
# |
Jul 6th 2018, 09:39 |
braeden |
It uses a 'query language' called CQL |
# |
Jul 6th 2018, 09:39 |
josbeir |
no xp with casandra, is it comparable to elasticsearch or more something like mongodb? |
# |
Jul 6th 2018, 09:38 |
braeden |
I enjoy it in a way, because it forces you to be more exact with your design |
# |
Jul 6th 2018, 09:38 |
josbeir |
dont think of it as denormalization |
# |
Jul 6th 2018, 09:37 |
josbeir |
its just a different mindset |
# |
Jul 6th 2018, 09:37 |
braeden |
They tell you to denormalise everything, which doesn't help my OCD at all |
# |
Jul 6th 2018, 09:37 |
braeden |
data modeling in Cassandra is a pain in the ass, I tell ya |
# |
Jul 6th 2018, 09:36 |
josbeir |
:) |
# |
Jul 6th 2018, 09:36 |
braeden |
:) |