Lists logged in user's posts on dashboard
$user_id = auth()->user()->id;
$user = User::find($user_id);
return view('dashboard')->with('posts', $user->posts);
by Valeri Tandilashvili
4 years ago
Laravel
models
Laravel From Scratch
3
Pro tip: use ```triple backticks around text``` to write in code fences