From 25d99e7b72c316073581a9fff3a485099cc7ca38 Mon Sep 17 00:00:00 2001 From: DoarMihai Date: Mon, 3 Feb 2025 02:38:32 +0200 Subject: [PATCH] progress --- app/Http/Controllers/ProfileController.php | 3 +++ resources/views/profile/profile.blade.php | 5 ++++- resources/views/profile/show.blade.php | 11 +++++++++++ routes/web.php | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 resources/views/profile/show.blade.php diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index bcee262..fce1458 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -2,12 +2,15 @@ namespace App\Http\Controllers; +use App\Models\User; use Illuminate\Http\Request; class ProfileController extends Controller { public function show(string $slug) { + $user = User::where('slug', $slug)->first(); + return view('profile.show', compact('user')); } } diff --git a/resources/views/profile/profile.blade.php b/resources/views/profile/profile.blade.php index f251ff9..5539379 100644 --- a/resources/views/profile/profile.blade.php +++ b/resources/views/profile/profile.blade.php @@ -25,7 +25,10 @@