Skip to content

Instantly share code, notes, and snippets.

@malgorath
Created September 16, 2016 16:48
Show Gist options
  • Save malgorath/de9c1bf94d8679e3b3abfbd20548edd3 to your computer and use it in GitHub Desktop.
Save malgorath/de9c1bf94d8679e3b3abfbd20548edd3 to your computer and use it in GitHub Desktop.
Continually Wraps to login
Route::group(['middleware' => 'auth'], function () {
Route::get('/', 'CategoriesController@index');
Route::resource('categories', 'CategoriesController');
Route::resource('categories.links', 'LinksController');
Route::bind('categories', function($value, $route) {
return App\Categories::whereSlug($value)->first();
});
Route::bind('links', function($value, $route) {
return App\Links::whereSlug($value)->first();
});
});
Auth::routes();
Route::get('/home', 'CategoriesController@index');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment