tissue/routes/web.php
2017-11-03 18:10:50 +09:00

29 lines
1.1 KiB
PHP

<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Auth::routes();
Route::get('/', 'HomeController@index')->name('home');
Route::get('/user', function() {
return redirect()->route('user.profile', ['name' => Auth::user()->name]);
})->middleware('auth')->name('user.profile');
Route::get('/user/{name?}', 'UserController@profile')->name('user.profile');
Route::get('/user/{name}/stats', 'UserController@stats')->name('user.stats');
Route::get('/user/{name}/okazu', 'UserController@okazu')->name('user.okazu');
Route::middleware('auth')->group(function () {
Route::get('/checkin', 'EjaculationController@create')->name('checkin');
Route::post('/checkin', 'EjaculationController@store')->name('checkin');
Route::delete('/checkin/{id}', 'EjaculationController@destroy')->name('checkin.destroy');
});