現在laravelの学習中でECサイトを製作しており、ログインページに行く際に404エラーがでてしまいます。
学習に参考にしているページ
https://note.com/mukae9/n/na6c15b5f9cec?magazine_key=m1efe9a2b9813
調べたところphp artisan route:clearを実行してみたのですが直りません。
昨日まではこんなことはなく、急に出てしまいました。
ルーティングを見直してみたのですが、おそらくおかしなところはないと思います。
ご存知の方お力をお貸しください。一応routeの内容を載せます。その他必要な部分があれば言っていただければと思います。
初学者のため分からない部分が多いと思いますがどうかよろしくお願いいたします。
PHP
1<?php 2 3 4/* 5|-------------------------------------------------------------------------- 6| Web Routes 7|-------------------------------------------------------------------------- 8| 9| Here is where you can register web routes for your application. These 10| routes are loaded by the RouteServiceProvider within a group which 11| contains the "web" middleware group. Now create something great! 12| 13*/ 14 15Route::get('/', 'App\Http\Controllers\ShopController@index'); 16Route::get('/{item}','App\Http\Controllers\ShopController@show'); 17Route::get('/cart_item', 'App\Http\Controllers\ShopController@cart_item')->middleware('auth'); 18Route::post('/cart_item', 'App\Http\Controllers\ShopController@addCart_item'); 19Route::post('/cartdelete', 'App\Http\Controllers\ShopController@deleteCart'); 20Route::post('/thanks', 'App\Http\Controllers\ShopController@thanks'); 21 22Auth::routes(); 23
php artisan route:list +--------+----------+------------------------+------------------+------------------------------------------------------------------------+------------+ | Domain | Method | URI | Name | Action | Middleware | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+------------+ | | GET|HEAD | / | | App\Http\Controllers\ShopController@index | web | | | GET|HEAD | api/user | | Closure | api | | | | | | | auth:api | | | GET|HEAD | cart_item | | App\Http\Controllers\ShopController@cart_item | web | | | | | | | auth | | | POST | cart_item | | App\Http\Controllers\ShopController@addCart_item | web | | | POST | cartdelete | | App\Http\Controllers\ShopController@deleteCart | web | | | 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 | | | GET|HEAD | password/confirm | password.confirm | App\Http\Controllers\Auth\ConfirmPasswordController@showConfirmForm | web | | | | | | | auth | | | POST | password/confirm | | App\Http\Controllers\Auth\ConfirmPasswordController@confirm | web | | | | | | | auth | | | POST | password/email | password.email | App\Http\Controllers\Auth\ForgotPasswordController@sendResetLinkEmail | web | | | GET|HEAD | password/reset | password.request | App\Http\Controllers\Auth\ForgotPasswordController@showLinkRequestForm | web | | | POST | password/reset | password.update | App\Http\Controllers\Auth\ResetPasswordController@reset | web | | | GET|HEAD | password/reset/{token} | password.reset | App\Http\Controllers\Auth\ResetPasswordController@showResetForm | web | | | GET|HEAD | register | register | App\Http\Controllers\Auth\RegisterController@showRegistrationForm | web | | | | | | | guest | | | POST | register | | App\Http\Controllers\Auth\RegisterController@register | web | | | | | | | guest | | | POST | thanks | | App\Http\Controllers\ShopController@thanks | web | | | GET|HEAD | {item} | | App\Http\Controllers\ShopController@show | web | +--------+----------+------------------------+------------------+------------------------------------------------------------------------+------------+