passing the user to the view, to show its username
This commit is contained in:
parent
d5746cfe68
commit
9c28101d42
@ -15,7 +15,8 @@ class PostController extends Controller implements HasMiddleware
|
||||
|
||||
public function index(User $user, Request $request)
|
||||
{
|
||||
dd($user);
|
||||
return view("dashboard");
|
||||
return view("dashboard", [
|
||||
"user" => $user
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
</div>
|
||||
|
||||
<div class="md:w-8/12 lg:w-6/12 px-5">
|
||||
<p class="text-gray-700 text-2xl">{{ auth()->user()->username }} </p>
|
||||
<p class="text-gray-700 text-2xl">{{ $user->username }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user