diff --git a/stubs/app/Models/User.php b/stubs/app/Models/User.php index 86af26e4..ba0e15f5 100644 --- a/stubs/app/Models/User.php +++ b/stubs/app/Models/User.php @@ -68,8 +68,8 @@ class User extends Authenticatable */ public function profilePhotoUrl(): Attribute { - return Attribute::get(fn () => filter_var($this->profile_photo_path, FILTER_VALIDATE_URL) - ? $this->profile_photo_path - : ($this->getPhotoUrl()->get)()); + return filter_var($this->profile_photo_path, FILTER_VALIDATE_URL) + ? Attribute::get(fn () => $this->profile_photo_path) + : ($this->getPhotoUrl()->get)(); } } diff --git a/stubs/app/Models/UserWithTeams.php b/stubs/app/Models/UserWithTeams.php index 557f80ff..122d5091 100644 --- a/stubs/app/Models/UserWithTeams.php +++ b/stubs/app/Models/UserWithTeams.php @@ -70,8 +70,8 @@ class User extends Authenticatable */ public function profilePhotoUrl(): Attribute { - return Attribute::get(fn () => filter_var($this->profile_photo_path, FILTER_VALIDATE_URL) - ? $this->profile_photo_path - : ($this->getPhotoUrl()->get)()); + return filter_var($this->profile_photo_path, FILTER_VALIDATE_URL) + ? Attribute::get(fn () => $this->profile_photo_path) + : ($this->getPhotoUrl()->get)(); } }