# |
Jul 14th 2018, 13:28 |
blueman |
to continue the execution flux |
# |
Jul 14th 2018, 13:27 |
blueman |
the function must not have a redirect |
# |
Jul 14th 2018, 13:24 |
blueman |
i was readng cake event system ... but i just want to call an function in NotificationsController to save the notification in database |
# |
Jul 14th 2018, 13:22 |
neon1024 |
Although, this kind of system is already in the core with the FlashComponent really |
# |
Jul 14th 2018, 13:21 |
neon1024 |
blueman, What sort? Live or by request? If you want on request you could use Events, and just dispatch a notification event, then have a listener which adds it to the request or session, perhaps sets it to the view for output |
# |
Jul 14th 2018, 13:20 |
neon1024 |
:flag-england: v :flag-in: - We also lost by 8 wickets in the ODI cricket :,( |
# |
Jul 14th 2018, 13:16 |
josbeir |
Would be good |
# |
Jul 14th 2018, 13:15 |
neon1024 |
Maybe 2/1 perhaps |
# |
Jul 14th 2018, 13:15 |
neon1024 |
BEL 2 : 0 ENG |
# |
Jul 14th 2018, 13:13 |
josbeir |
Yes for the third place |
# |
Jul 14th 2018, 13:13 |
josbeir |
Create a separate library or use the cake event system |
# |
Jul 14th 2018, 13:12 |
saeideng |
football ? today ? |
# |
Jul 14th 2018, 13:12 |
blueman |
i want a notification systeme in my app |
# |
Jul 14th 2018, 13:12 |
josbeir |
:flag-be: :heavy_check_mark: :flag-gb: |
# |
Jul 14th 2018, 13:11 |
neon1024 |
If you really need a static |
# |
Jul 14th 2018, 13:11 |
josbeir |
That's what i said |
# |
Jul 14th 2018, 13:11 |
neon1024 |
This should be refactored out into it's own static class |
# |
Jul 14th 2018, 13:10 |
neon1024 |
Also, more to the point. Why does your Controller have a static method? |
# |
Jul 14th 2018, 13:10 |
josbeir |
Your naming is wrong as stated above |
# |
Jul 14th 2018, 13:10 |
blueman |
i have class notification controller |
# |
Jul 14th 2018, 13:10 |
blueman |
yes |
# |
Jul 14th 2018, 13:09 |
josbeir |
Not sure on the why though :S |
# |
Jul 14th 2018, 13:09 |
saeideng |
do you have a class here `src/Controller/Customer/Notifications.php` ? |
# |
Jul 14th 2018, 13:08 |
josbeir |
NotificationsController |
# |
Jul 14th 2018, 13:08 |
blueman |
done but i have always the same error |
# |
Jul 14th 2018, 13:08 |
josbeir |
Should have controller suffix |
# |
Jul 14th 2018, 13:08 |
blueman |
use App\Controller\Customer\Notifications; |
# |
Jul 14th 2018, 13:07 |
josbeir |
Is your controller included in the use statements? |
# |
Jul 14th 2018, 13:07 |
blueman |
Class 'App\Controller\Customer\Notifications' not found |
# |
Jul 14th 2018, 13:07 |
blueman |
when i did it i have problem |
# |
Jul 14th 2018, 13:04 |
neon1024 |
You can just call a static, that's the whole point. Such as `Log::debug('Example');` |
# |
Jul 14th 2018, 13:00 |
blueman |
i'm looking for how can i call a static function in an other controller ? |
# |
Jul 14th 2018, 13:00 |
neon1024 |
Hello |
# |
Jul 14th 2018, 12:59 |
blueman |
hello everybody |
# |
Jul 14th 2018, 12:58 |
neon1024 |
Yes, I suppose so |
# |
Jul 14th 2018, 12:57 |
admad |
@neon1024 disabling security component for index is actually a reasonable thing. Since nothing is being saved/remove from db there's no need for security |
# |
Jul 14th 2018, 12:52 |
neon1024 |
I've sidestepped this in other places with `$this->Security->setConfig('unlockedActions', ['index']);` which doesn't feel like a good solution |
# |
Jul 14th 2018, 12:51 |
neon1024 |
In my search form, when I submit a filter, I'm getting `'_Token' was not found in request data.` but I'm unsure how to use the Security component to add the token |
# |
Jul 14th 2018, 12:21 |
neon1024 |
It's a bit obtuse |
# |
Jul 14th 2018, 12:21 |
neon1024 |
Glad I've hit that one before! |
# |
Jul 14th 2018, 12:21 |
neon1024 |
Found the issue, it was a bad Nginx config, which was passing the url as a query param |