I want to call only the Data with one user ID only: and i get the below error:
Missing required parameters for [Route: VLead] [URI: VLead/{id}]. (View: C:\wamp64\www\S2\resources\views\admin\sidebar\sidebar.blade.php) (View: C:\wamp64\www\S2\resources\views\admin\sidebar\sidebar.blade.php)
Route::get('/VLead/{id}', 'ClientController@index_lead')->name('VLead')->middleware('user');
Controller
public function index_lead($id)
{
$clients = DB::table('clients')->where('Stage','<>',"Active" )
->orderBy('id', 'Aesc')
->get();
return view('admin.VLead',compact('clients'));
}
<script language="javascript" type="text/javascript">
var scrt_var = {{ Sentinel::getuser()->id}};
</script>
<li><a class="" href="{{route('VLead')}} "onclick="location.href=this.href+'/'+scrt_var;return false;" >Leads</a></li>