name('home'); Route::get('/user', function() { return redirect()->route('profile', ['name' => Auth::user()->name]); })->middleware('auth')->name('profile'); Route::get('/user/{name?}', 'UserController@profile')->name('profile'); Route::middleware('auth')->group(function () { Route::get('/checkin', 'EjaculationController@create')->name('checkin'); Route::post('/checkin', 'EjaculationController@store')->name('checkin'); });