As in the blade template to create a link to id it in the middle?

0 like 0 dislike
4 views
For example, there are reference books.local/admin/authors/1/edit
Instead, the unit can be any number that corresponds to the id.
Tried to do so
Edit
by | 4 views

1 Answer

0 like 0 dislike
https://laravel.ru/docs/v5/helpers#url-%D0%B0%D0%B...
\rhttps://laravel.com/docs/5.6/urls

It is convenient to use named ranting.
In ranting:
Route::get('аdmin/authors/{author}/edit', ['as' => 'routeName', 'uses' => 'ControllerName@methodName']);

Then get a link like this:
{{ route('routeName', $author->id) }}
Or, if $author - suitable model, even so:
{{ route('routeName', $author) }}

Get the address http://domain.name/аdmin/authors/123/edit
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked May 21, 2019 by igor1112
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
33,904 users