I started a small project using Laravel and i try to pass a user_id variable from my controller to my view, but i get an error message :
Undefined variable: user_id
This is my controller function :
public function modals(Request $request){
return view("modals.member", ["user_id" => 11]);
}
And this is my view page :
<strong>{{ $user_id }}</strong>
What wrong ?