bans()->exists()) { $this->banStatus = BanStatusEnum::Good; return; } $banCheckQuery = $user->bans() ->where('start_date', '<', Carbon::now(config('app.timezone'))->toDateTimeString()) ->where('end_date', '>', Carbon::now(config('app.timezone'))->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'); } }