laravel - button redirecting to wrong path -


i using link button in blade view. code follows:

<a href="conclusion" class='btn btn-default btn-sm'>end case</a> 

the url of page on link button is:

http://localhost/cases/137/responses/30 

the result of button should

http://localhost/cases/137/responses/30/conclusion  

but redirecting

http://localhost/cases/137/responses/conclusion 

my laravel route definition is:

get('/cases/{id}/responses/{respid}/conclusion', 'homecontroller@conclusion'); 

what wrong it? how can it?

the save way generate urls use laravels helper functions. way don't have problem relative urls generates full url. in case action() appropriate:

<a href="{{ action('homecontroller@conclusion', [$id, $respid]) }}" class='btn btn-default btn-sm'>end case</a> 

alternatively can give route name:

get('/cases/{id}/responses/{respid}/conclusion', [     'as' => 'conclusion',     'uses' => 'homecontroller@conclusion' ]); 

and then:

<a href="{{ route('conclusion', [$id, $respid]) }}" class='btn btn-default btn-sm'>end case</a> 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -