lundi 30 avril 2018

Laravel, need variable on admin routes

I need a variable for my admin dashboard, so my guess is to put something inside cache so I can do I can access it in my admin layout-template.

if (!\Cache::has('admin-menu')) {
 \Cache::set('admin-menu', ['some' => 'data']);
}

Should I put it inside route middleware or somewhere else like the RouteServiceProvider? I am not that good in programming so I don't know what is the best approach.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2r8aVwa
via IFTTT

Aucun commentaire:

Enregistrer un commentaire