From 184097893e22144846b5c3ddc6683b945020a36a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 18 Apr 2018 23:56:33 -0600 Subject: [PATCH] Update ProfileController --- app/Http/Controllers/ProfileController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 815a14ce4..ffe348f62 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -3,8 +3,14 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; +use App\{Profile}; class ProfileController extends Controller { - // + public function show(Request $request, $username) + { + $user = Profile::whereUsername($username)->firstOrFail(); + $timeline = $user->statuses()->orderBy('id','desc')->paginate(10); + return view('profile.show', compact('user', 'timeline')); + } }