I created 3 composer views previously and they all work properly, but then I created another one, which doesn\'t seem to work. I\'ve been trying to get it to work, it doesn\
You are doing it wrong, put this code into boot
method inside of your provider
and also, remove the code from register
and remove your method composeEven
:
View::composer(
'layouts.aklinkosesi', 'App\Http\Composers\EvenComposer'
);
So here is the solutions which might work for people in same sitatuin. First try these commands:
composer update
php artisan config:clear
php artisan cache:clear
composer dumpautoload
php artisan cache:clear
I tried a few of them than deleted bootstrap/cache/config
file and it worked.