After clicking in view,
{!! Form::open(['method' => 'GET', 'route' => ['city', $city->id]]) !!}
{!! Form::submit('Check', ['class' => 'btn btn-success']) !!}
{!! Form::close() !!}
system finds this route:
Route::get('city/{id}', 'CityController@show')->name('city');
which makes URL in web browser look like this:
http://localhost:8888/game/public/city/5?
problem is however, that when I click on another link for example:
<li><a href="home">Reports</a> </li>
I get URL in following format:
http://localhost:8888/game/public/city/home
instead of:
http://localhost:8888/game/public/home
Which is wrong since it doesn't work. How do I correct it?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire