Sunday, February 11, 2018

Log out user and change location after certain period of time - development

Log out user and change location after certain period of time

I have written the basics only and I don’t know what would be the best way to log out the user and redirect him to some other page after let’s say 10 minutes.

Simple routes:

Route::get('/post/create', 'PostsController@create');
Route::post('/post/store', 'PostsController@store');

Controller function:

public function create()
{
    return view('form_components_html.create');
}

I know there is this function Auth::logout(); But I don’t know how and where to put it, and how to delay it for 10 min?



from Laravel Questions and Answers https://laravelquestions.com/laravel/log-out-user-and-change-location-after-certain-period-of-time/
via Lzo Media

No comments:

Post a Comment