my Route is :
Route::get('/dash/{$slug}', 'DashController@client');
I am currently using the below in a Controller:
public function client($slug)
{
$idz = Company::where('CompanyID', $slug)->first();
return view('dashboards.companydashboard', [
'id' => $idz
]);
}
and in my html page i have :
<p>{{$id}}</p>
its not outputting the value, what am I missing
You route is wrong, {$slug}
will be {slug}
:
Route::get('/dash/{slug}', 'DashController@client');