I have a route
Route::get('/','WebController@index');
I have a controller
public function index()
{
$cars = Cars::table('cars')->get();
return view('web::index')->with('cars', $cars);
}
And in form
it passes the following URL
{!! Form::open(['class' => 'form-horizontal search-side-box', 'url' => '/', 'method' => 'post', 'autocomplete' => 'off']) !!}
But when I click the button submit
of form
, it gives the following error:
Class App\Front\Http\Controllers\WebController does not exist
But the controller is configured so much that in other places I call the URL '/' and it works, only in form
that does not. And when I pass another URL in form
it also works:
{!! Form::open(['class' => 'form-horizontal search-side-box', 'url' => '/about', 'method' => 'post', 'autocomplete' => 'off']) !!}