From b019860f165405e33dd3b934370ad4a28bf8b009 Mon Sep 17 00:00:00 2001 From: Ali-Sid <59683051+Ali-Sid@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:04:58 +0530 Subject: [PATCH] Update HomeController.php --- app/Http/Controllers/HomeController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index eb6688af..08853bc8 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -34,6 +34,10 @@ public function rows() { $users = User::all(); + if($users->isEmpty()) { + return view('rows', ['users' => 'No content']); + } + return view('rows', compact('users')); }