Hello,
I have a blade Layout called:
profile.blade.php
// component
And I have a blade file infos which extends from profile.blade.php
component.
On my controller, I have a profile method:
public method profile(User $user) {
return view('infos.blade.php', compact('user'));
}
When I try to use the variable user to the profile.blade.php component, I have an error that says "undefined user variable"
My question is how can I get the data I received from my controller to Blade Component profle ? Because that part of component will be used many times.
Thanks.