name)); } return view('welcome'); }); Route::group(['middleware' => 'auth'], function () { // Table resource Route::group([ 'prefix' => 'table', ], function () { Route::get('create', 'TableController@create')->name('table.create'); Route::post('create', 'TableController@storeNew')->name('table.storeNew'); }); Route::group([ 'prefix' => 'user', ], function () { Route::get('edit', 'UserController@edit')->name('user.edit'); Route::post('edit', 'UserController@store')->name('user.store'); Route::post('create', 'TableController@storeNew')->name('table.storeNew'); Route::get('logins', 'UserController@manageOauth')->name('user.manage-oauth'); }); }); // Table resource - located at the end to work as a fallback Route::get('@{user}', 'UserController@view')->name('user.view'); Route::get('@{user}/{table}', 'TableController@view')->name('table.view');