Eager Load User Relationships in Scout Model Method

This commit is contained in:
Refringe 2024-10-01 09:25:05 -04:00
parent 293e52726b
commit 1521e50dcb
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k

View File

@ -137,6 +137,8 @@ class User extends Authenticatable implements MustVerifyEmail
*/
public function shouldBeSearchable(): bool
{
$this->load(['bans']);
return $this->isNotBanned();
}