Ad

Route [foo/1/bar] Not Defined

- 1 answer

Route [foo/1/bar] not defined. Found in resources/views/bar/create.blade.php

This is in routes/web.php;

Route::post('/foo/{client}/bar', '[email protected]');

This is the line which is causing the issue;

form action="{{ route('foo/'.$client->id.'/bar') }}" method="POST" enctype="multipart/form-data">
Ad

Answer

what should do is

form action="{{ url('foo/'.$client->id.'/bar') }}" method="POST" enctype="multipart/form-data">

since you did not define name route like this

Route::post('/foo/{client}/bar', '[email protected]')->name('bar_post');
Ad
source: stackoverflow.com
Ad