Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel '404 not found' error even after having a proper route?

Tags:

php

laravel

Even after having a proper route set in my web.php, I am getting the 404 not found error in my Laravel application in local mode.

enter image description here

All the pages are working correctly except this one and I am getting this error with POST method after clicking on submit button on the form. Here is my web.php file.

Route::get('categories/create',"CategoryController@create");
Route::post('categories',"CategoryController@store");

UPDATE: My logs says:

[Wed Mar 21 16:40:22 2018] 127.0.0.1:59460 [404]: /categories - No such file or directory
[Wed Mar 21 16:40:22 2018] 127.0.0.1:59464 [200]: /favicon.ico
[Wed Mar 21 16:41:00 2018] 127.0.0.1:59472 [404]: /categories - No such file or directory
[Wed Mar 21 16:41:00 2018] 127.0.0.1:59476 [200]: /favicon.ico
[Wed Mar 21 16:41:03 2018] 127.0.0.1:59480 [200]: /favicon.ico
[Wed Mar 21 16:41:09 2018] 127.0.0.1:59484 [404]: /categories - No such file or directory
[Wed Mar 21 16:41:09 2018] 127.0.0.1:59488 [200]: /favicon.ico

Here is my View file -> https://pastebin.com/NEukzc5s

like image 639
p01ymath Avatar asked Sep 20 '25 05:09

p01ymath


1 Answers

you may have same categories named directory in project's public folder. (public/categories)

Just rename that directory to some other name and try.

like image 111
Mayank Majithya Avatar answered Sep 22 '25 05:09

Mayank Majithya