mardi 18 juin 2019

Laravel named route not defined after clearing cache

My named route throws an error. I have tried php artisan route:clear but cannot seem to get it to work.

Code web.php:

Route::get('/item', function() {
    return 'I am item';
})->name('bar');

$x = route('bar'); 

Error:

InvalidArgumentException
Route [bar] not defined.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2XlslXk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire