diff --git a/dist/app/View/Components/Misc/BanStatus.php b/dist/app/View/Components/Misc/BanStatus.php index 6487a43..7c1fed7 100644 --- a/dist/app/View/Components/Misc/BanStatus.php +++ b/dist/app/View/Components/Misc/BanStatus.php @@ -24,8 +24,8 @@ public function __construct(public User $user) } $banCheckQuery = $user->bans() - ->whereDate('start_date', '<', Carbon::now()) - ->whereDate('end_date', '>', Carbon::now()); + ->whereDate('start_date', '<', Carbon::now()->toDateTimeString()) + ->whereDate('end_date', '>', Carbon::now()->toDateTimeString()); if ($banCheckQuery->exists()) $this->banStatus = BanStatusEnum::Banned; diff --git a/dist/app/View/Components/Misc/banStatus.php b/dist/app/View/Components/Misc/banStatus.php deleted file mode 100644 index 7c1fed7..0000000 --- a/dist/app/View/Components/Misc/banStatus.php +++ /dev/null @@ -1,43 +0,0 @@ -bans()->exists()) { - $this->banStatus = BanStatusEnum::Good; - return; - } - - $banCheckQuery = $user->bans() - ->whereDate('start_date', '<', Carbon::now()->toDateTimeString()) - ->whereDate('end_date', '>', Carbon::now()->toDateTimeString()); - - if ($banCheckQuery->exists()) - $this->banStatus = BanStatusEnum::Banned; - else - $this->banStatus = BanStatusEnum::Warning; - } - - /** - * Get the view / contents that represent the component. - */ - public function render(): View|Closure|string - { - return view('components.misc.ban-status'); - } -}