This commit is contained in:
nurmuhammet committed 2023-12-14 19:03:25 +05:00
1 parent a3771218f0
commit 445884782a
12 files changed
+404 -30

No files matched your search

+16 -1
View File
@@ -16,7 +16,6 @@
class User extends Authenticatable
{
use Actionable;
use HasApiTokens;
use HasFactory;
use HasRoles;
@@ -75,6 +74,14 @@ public function loanOrders(): HasMany
return $this->hasMany(LoanOrder::class);
}
/**
* Check if user has role.
*/
public function withoutRole(): bool
{
return $this->roles->count() === 0;
}
/**
* Check if user is me.
*/
@@ -138,4 +145,12 @@ public function phoneIsVerified(): bool
{
return ! is_null($this->phone_verified_at);
}
/**
* Profile page of user
*/
public function profilePage(): string
{
return '/resources/users/'. $this->id;
}
}