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 @@