diff --git a/app/Livewire/VideoAd.php b/app/Livewire/VideoAd.php index ce1fcdf..a2254a4 100644 --- a/app/Livewire/VideoAd.php +++ b/app/Livewire/VideoAd.php @@ -7,6 +7,24 @@ class VideoAd extends Component { + public $status; + public function mount(): void + { + $this->status = session('videoStatus', 'hidden'); + } + + public function closeVideo(): void + { + $this->status = 'hidden'; + session(['videoStatus' => 'hidden']); + } + + public function showVideo(): void + { + $this->status = 'visible'; + session(['videoStatus' => 'visible']); + } + public function render(): View { return view('livewire.video-ad'); diff --git a/resources/views/livewire/video-ad.blade.php b/resources/views/livewire/video-ad.blade.php index 605a3b5..aabe402 100644 --- a/resources/views/livewire/video-ad.blade.php +++ b/resources/views/livewire/video-ad.blade.php @@ -1,3 +1,22 @@
- {{-- The Master doesn't talk, he acts. --}} + @guest +
+
+
+ + +
+
+
+ @if($status == 'hidden') +
+ +
+ @endif + @endguest
diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index afc127e..a3d6fd3 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -2,19 +2,9 @@ Home - Premium Essay Writing Services for College Students - @guest -
-
- - -
-
- @endguest + + +