route
Route::get('/dashboard/view-sub-project/{pid}/{sid}', 'SubProjectController@view')->name('sub-project.view')->middleware('auth');
View
<a href="{{ route('sub-project.view', request()->route()->parameters['id'] . '/' . $update->id) }}" class="btn btn-primary project-view">View</a>
Values of var
request()->route()->parameters['id']
is 2
$update->id
is 1
I have defined router correctly on web.php and view but still, it throws an error
Missing required parameters for [Route: sub-project.view] [URI: dashboard/view-sub-project/{pid}/{sid}]. (View: /var/www/html/groot-server/resources/views/project/view.blade.php)
I have tried to change my router like this also
Route::get('/dashboard/view-sub-project/{pid}{sid}', 'SubProjectController@view')->name('sub-project.view')->middleware('auth');
Still got the same error.