I am using Laravel 5.2 and Zizaco/entrust 5.2.x .
How to control role's access to different path?
For example:
The route of admin is like this:
Route::group(['middleware' => 'web'], function () {
Route::auth();
Route::group(['prefix' => 'admin','namespace' => 'Admin'], function () {
Route::resource('dashboard', 'DashboardController');
});
});
I would want that the role admin can access http://www.example.com/admin/dashboard/ ,
other roles cann't access it,
What should I do?