In Laravel, If I call a url from controller it didn't work properly.
For example I am in this location like example.com/dev/lar/public/index.php/location/{$id}
. Now I am redirection to following routes location/create
. For example url will be <a href="location/create"></a>
. Then url shows example.com/dev/lar/public/index.php/location/location/create
.
My web file is given below.
Route::get("location/all","LocationController@showall");
Route::resource("location","LocationController");
Update : I updated my error message in screenshot
Error message screenshot is given below.
I just use URL::to('location/create') function. Then route works. This solution was suggested by @lea Tanao