I can't fix this error: Route *[admin.conditions.update]* not defined
.
I checked some other posts with the same question, but still can't figure it out.
I checked php artisan route:list
. For conditions.update
the path was :
admin/conditions/{condition} App/http/controllers/ConditionsController@update
The routes in web.php
:
Route::group( ['prefix'=>'admin'] , function()
{
Route::resource('/conditions','conditionsController');
Route::get('index' , function()
{
return View('admin.index');
});
});
My edit.blade.php
route:
{!! Form::model( $record , ['method'=>'PATCH' , 'route'=>['admin.conditions.update', $record->id] ] ) !!}
Error is:
Route [admin.conditions.update] not defined. (View: C:\wamp64\www\dbsystem\resources\views\admin\conditions\edit.blade.php)*
Some following errors:
in UrlGenerator.php line 304
at CompilerEngine->handleViewException(object(InvalidArgumentException), 1)in PhpEngine.php line 44
at PhpEngine->evaluatePath('C:\\wamp64\\www\\dbsystem\\storage\\framework\\views/e2e78c3d81e946fdb92174f035a7944bab024389.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'record' => object(ConditionsModel)))in CompilerEngine.php line 59
at CompilerEngine->get('C:\\wamp64\\www\\dbsystem\\resources\\views/admin/conditions/edit.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'record' => object(ConditionsModel)))in View.php line 137
at View->getContents()in View.php line 120