I am using Laravel 8 with fortify
auth without Jetstream.
web.php
Route::get('/facade_version', function () {
dd('EXAMPLE');
})->name('postcard.facade');
Above is my route
index.blade.php
<a href="{{ route('postcard.facade') }}" type="a" class="btn btn-success">facade postcard</a>
Route [postcard.facade] not defined. (View: E:\github\LARAVEL\laravel8-fortify\resources\views\facade\index.blade.php)
I tried with second way using http://127.0.0.1:8000/facade_version
in url
404 | Not Found
Everything is ok But I could not figure it out whats the problem.
I have done this kind of route before with same way.
But this is not working
Look at the below route. it works perfectly.
Route::get('/post-cards', function () {
$postcardService = new PostcardSendingService('USA', 4, 6);
$postcardService->hello('Hello from Coder Tape USA!!', 'imrul.cse273@gmail.com');
})->name('postcard.index');
/post-cardsss
instead of /post-cards
' then again the route is not foundToday I ran these commands in my projects
php artisan config:clear
php artisan view:clear
php artisan cache:clear
php artisan route:cache
composer dump-autoload
Solved it using this command
php artisan route:clear
And run the project again