Skip to content
Advertisement

Route Not Defined – Blade Laravel

My problem is similar to this one but solution is not working.

Route [postThisAppraisal] not defined. (View: C:xampphtdocslaraveladminresourcesviewsadminappraisalsfillAppraisal.blade.php)

My route in web.php is as following: (without any namespace)

Route::post('/postThisAppraisal', 'PublicController@postThisAppraisal')->name('postThisAppraisal');

And in blade.php i am calling it like following:

<form action="{{ route("postThisAppraisal") }}" method="POST" enctype="multipart/form-data">

I have even defined it in PublicController as following:

public function postThisAppraisal(){
    return "submitted";
}

Advertisement

Answer

You can use php artisan route:list to show a list of registered routes – make sure it shows up there. If it doesn’t, use php artisan route:clear to clear Laravel’s route cache

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement