vendredi 2 février 2018

Laravel: Add route prefix from session variable

In Laravel 5.2 route file I'm trying to do something like:

Route::group('prefix' => Session::get('dataId')], ...

however, I noticed that I can't access the session variable from there.

I don't want to do:

Route::group('prefix' => {dataId}], ...

because it will take too much time to add it in all the methods in the controllers.

Any ideas how to achieve this functionality?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire