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' => 'profile', ], function () { Route::get('edit', 'ProfileController@edit')->name('profile.edit'); Route::post('edit', 'ProfileController@store')->name('profile.store'); Route::post('create', 'TableController@storeNew')->name('table.storeNew'); Route::get('logins', 'ProfileController@manageOauth')->name('profile.manage-oauth'); }); }); // Table resource - located at the end to work as a fallback Route::get('@{user}', 'ProfileController@view')->name('profile.view'); Route::get('@{user}/{table}', 'TableController@view')->name('table.view');