By using authorize middleware like:
$router->group(['middleware' => 'auth'], function($router)
{
Route::get('login', 'Auth\AuthController@getLogin');
Route::post('loggin', 'Auth\AuthController@postLogin');
Route::get('pedit', array('uses' => 'PetsController@petedit'));
Route::post('pupdate', array('uses' => 'PetsController@pupdate'));
});
There are previous answers. Also there's a free Laracast on authorize.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community