When I run command $ php artisan serve
, I got this error:
[Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected 'as' (T_AS)
Route::group(['prefix' => 'admin'], function() {
Route::get('/', [ 'as' => 'admin.login', 'uses' => 'Admin\AuthController@getLogin' ]);
Route::post('/login', [ 'as' => 'admin.checkLogin', 'uses' => 'Admin\AuthController@checkLogin' ]);
Route::get('/logout', [ 'as' => 'admin.logout', 'uses' => 'Admin\AuthController@getLogout' ]);
Route::group(['middleware' => 'auth'], function() {
Route::get('/dashboard', function(){
return view('admin::user.dashboard');
});
Route::get('/users', [ 'as' => 'user.index', 'uses' => 'UserController@index' ]);
});
});
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire