[vagrant@localhost demo]$ php artisan route:list
+——–+———-+————————+——————+————————————————————————+————–+
| Domain | Method | URI | Name | Action | Middleware |
+——–+———-+————————+——————+————————————————————————+————–+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|HEAD | home | home | App\Http\Controllers\HomeController@index | web,auth |
| | GET|HEAD | login | login | App\Http\Controllers\Auth\LoginController@showLoginForm | web,guest |
| | POST | login | | App\Http\Controllers\Auth\LoginController@login | web,guest |
| | POST | logout | logout | App\Http\Controllers\Auth\LoginController@logout | web |
| | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail | web,guest |
| | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm | web,guest |
| | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController@reset | web,guest |
| | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController@showResetForm | web,guest |
| | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController@showRegistrationForm | web,guest |
| | POST | register | | App\Http\Controllers\Auth\RegisterController@register | web,guest |
+——–+———-+————————+——————+————————————————————————+————–+
/home はログイン後の画面
routes/web.php
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
resources/views/authに以下のphpファイルが出来ている
– login.blade.php
– register.blade.php
– verify.blade.php
– passwords/email.blade.php
– passwords/reset.blade.php
また、views/layouts/app.blade.php もできている。
app/Http/controllers/Auth にcontrollerもできている。
ForgotPasswordController.php
LoginController.php
RegisterController.php
ResetPasswordController.php
VertificationController.php
database/migration
users_table.php, password_resets_table.php
LoginController、RegisterController、ResetPasswordControllerのリダイレクト先を変更する。デフォルトはhome
protected $redirectTo = '/';