这是我的web.php
Route::get('read/{book_id}/{part_id}', 'BookPartController@show')->name('read');
这是景观
<a href="{{ route('read', [$part->book_id, $part->part_id]) }}">
我希望结果是mysite.com/read/808/121
,尽管结果是这个mysite.com/read/808
答案 0 :(得分:1)
尝试此操作,将键添加到数组:
<a href="{{ route('read',
['book_id' => $part->book_id, 'part_id' => $part->part_id]) }}">
答案 1 :(得分:0)
正确的方法:
<a href="{{ route('read', ['book_id' => $part->book_id, 'part_id' => $part->part_id]) }}">