Skip to content

Instantly share code, notes, and snippets.

@nicolasbinet
Created September 2, 2015 12:16
Show Gist options
  • Save nicolasbinet/03c10be0dabd685475a8 to your computer and use it in GitHub Desktop.
Save nicolasbinet/03c10be0dabd685475a8 to your computer and use it in GitHub Desktop.
routes name problem
Route::group(['prefix' => 'dashboard', 'as' => 'dashboard.', 'middleware' => 'auth'], function () {
Route::get('/', ['as' => 'home', 'uses' => 'Dashboard\DashboardController@home']);
Route::resource('news', 'Dashboard\NewsController', ['as' => 'news']);
});
+--------+----------+------------------------------+---------------------------------------+------------------------------------------------------------+------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+----------+------------------------------+---------------------------------------+------------------------------------------------------------+------------+
| | GET|HEAD | dashboard | dashboard.home | App\Http\Controllers\Dashboard\DashboardController@home | auth |
| | GET|HEAD | dashboard/news | dashboard.news.dashboard.news.index | App\Http\Controllers\Dashboard\NewsController@index | auth |
| | POST | dashboard/news | dashboard.news.dashboard.news.store | App\Http\Controllers\Dashboard\NewsController@store | auth |
| | GET|HEAD | dashboard/news/create | dashboard.news.dashboard.news.create | App\Http\Controllers\Dashboard\NewsController@create | auth |
| | DELETE | dashboard/news/{news} | dashboard.news.dashboard.news.destroy | App\Http\Controllers\Dashboard\NewsController@destroy | auth |
| | PATCH | dashboard/news/{news} | dashboard. | App\Http\Controllers\Dashboard\NewsController@update | auth |
| | PUT | dashboard/news/{news} | dashboard.news.dashboard.news.update | App\Http\Controllers\Dashboard\NewsController@update | auth |
| | GET|HEAD | dashboard/news/{news} | dashboard.news.dashboard.news.show | App\Http\Controllers\Dashboard\NewsController@show | auth |
| | GET|HEAD | dashboard/news/{news}/edit | dashboard.news.dashboard.news.edit | App\Http\Controllers\Dashboard\NewsController@edit | auth |
+--------+----------+------------------------------+---------------------------------------+------------------------------------------------------------+------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment