i have install fresh laravel 5.7. now when i declare route in web.php. when i declare like
Route::get('foo', function () {
return 'Hello World';
});
it redirect to 404 page but.. when i declare my root directory name along with route just like
Route::get('blog/foo', function () {
return 'Hello World';
});
it shows me expected result..
but i don't want to define like that. i want to define like this and get the expected result
Route::get('foo', function () {
return 'Hello World';
});
help me !
It should work perfectly fine but try the following command and let me know if it fixes your issue
php artisan route:clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With