Route::post('reset/{key}', 'UsersController@postResetPassword'); }); Route::group(['prefix' => 'sessions', 'as' => 'sessions'], function () { Route::get('/', 'UsersController@showSessions'); Route::get('kill', function () { $user = Sentinel::getUser(); Sentinel::getPersistenceRepository()->flush($user); return Redirect::back(); }); Route::get('kill-all', function () { $user = Sentinel::getUser(); Sentinel::getPersistenceRepository()->flush($user, false); return Redirect::back(); }); Route::get('kill/{code}', function ($code) { Sentinel::getPersistenceRepository()->remove($code); return Redirect::back(); }); }); Route::group(['prefix' => 'posts', 'as' => 'posts'], function () { Route::get('/', function () { return Redirect::route('posts.list'); }); Route::group(['prefix' => 'list', 'as' => '.list'], function () { Route::get('/', 'PostsController@index'); }); Route::get('create', 'PostsController@create')->name('.create'); Route::put('create', 'PostsController@store')->name('.store'); Route::put('create/reply', 'PostsController@storeComment')->name('.reply'); Route::get('{id}', 'PostsController@show')->name('.show'); Route::patch('{id}', 'PostsController@update')->name('.update');
/** * Flushes all sessions. * * @return \Illuminate\Http\RedirectResponse */ public function flushAll() { Sentinel::getPersistenceRepository()->flush(Sentinel::getUser()); return Redirect::route('user.account'); }