Refactor deleteInvitation method in Invitations component
This commit is contained in:
@@ -20,6 +20,11 @@ class TeamInvitation extends Model
|
||||
return $this->belongsTo(Team::class);
|
||||
}
|
||||
|
||||
public static function ownedByCurrentTeam()
|
||||
{
|
||||
return TeamInvitation::whereTeamId(currentTeam()->id);
|
||||
}
|
||||
|
||||
public function isValid()
|
||||
{
|
||||
$createdAt = $this->created_at;
|
||||
|
||||
Reference in New Issue
Block a user