mercredi 5 juin 2019

Showing subpages based on a session in Laravel 5.8

I am begginer in Laravel. I am use Laravel 5.8 in my project.

I need to do something so that a specific route can be viewed by a user with a php adult = 1 session.

I have route:

Route::get('/', 'FrontendController@index')->name('index');
Route::get('/sample1', 'FrontendController@sample1')->name('sample1');

The SAMPLE1 view is for users with php adult = 1 session. If the user does not have such a session - it must be automatically redirected to @ index

How can you do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire