0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

localhost:8000に接続できないエラー(404 Not found)

Posted at

<エラー概要>

◉Laravel学習
http://localhost:8000/admin/profile/create
に接続を試みるも、

404 Not found

と出力されうまく実行できない。

#<仮説/試したこと>
◉ルーティングの記述確認
php artisan route:list
#<原因/結果>
admin/news/create
admin/news/delete
admin/news/edit
→このようにprofileのルーティングが全くできていませんでした、、

route/web.php
Route::group(['prefix' => 'admin'], function() {
       //ProfileController
       Route::get('profile/create', 'Admin\ProfileController@add');
       Route::get('profile/edit', 'Admin\ProfileController@edit');
       Route::post('profile/create', 'Admin\ProfileController@create');
       Route::get('profile/index', 'Admin\ProfileController@index');
});

上記のように追記し解決に至りました。

<感想>

 「ルーティングはしっかり出来ているはず!」という謎の思い込みから解決に時間を要してしまいました。
自分を疑い続けることは大切だと再認識できました。
今週は学習が中だるみしてしまったので11月最後まで走りきります!


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?