Hi guys,
I want call a index page on click in the <a href="{{route('company.index')}}">.
Worked with company, but that other methods not, a had ErrorException (Route [field] not defined) and InvalidArgumentException (Route [field] not defined).
Is the same code, it was not to make a mistake.
Controller
public function index()
{
$fields = Field::all();
return view('adm.field.index', compact('fields'));
}
Call View
<a href="{{route('field.index')}}">
<li>Field</li>
Route
Route::resource('field', 'FiedlController');
Please check your route name from php artisan route:list
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community