diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 3ec9546d..1ea08e52 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -11,7 +11,7 @@ public function users()
{
$usersCount = User::count();
- return view('users');
+ return view('users', compact('usersCount'));
}
// Task 2. Change the View code so alert would not show on the screen
diff --git a/resources/views/alert.blade.php b/resources/views/alert.blade.php
index 68bf0b9d..2980b456 100644
--- a/resources/views/alert.blade.php
+++ b/resources/views/alert.blade.php
@@ -9,7 +9,7 @@
- {!! $text !!}
+ {{ $text }}
Your task is to change the code of alert.blade.php, to avoid that JavaScript alert.
diff --git a/resources/views/authenticated.blade.php b/resources/views/authenticated.blade.php
index e200ae1e..b94b627d 100644
--- a/resources/views/authenticated.blade.php
+++ b/resources/views/authenticated.blade.php
@@ -11,8 +11,11 @@
{{-- Task: add a condition to show correct text --}}
{{-- If user is logged in, show their email --}}
- Yes, I am logged in as [insert_user_email_here].
- No, I am not logged in.
+ @if(auth()->check())
+ Yes, I am logged in as {{ auth()->user()->email }}.
+ @else
+ No, I am not logged in.
+ @endif
diff --git a/resources/views/include.blade.php b/resources/views/include.blade.php
index 95d9bd6c..74fcb45d 100644
--- a/resources/views/include.blade.php
+++ b/resources/views/include.blade.php
@@ -21,6 +21,7 @@