mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
149 - Viewing Used or Invalid Invitations
This commit is contained in:
@@ -8,6 +8,11 @@ class Invitation extends Model
|
||||
{
|
||||
public static function findByCode($code)
|
||||
{
|
||||
return self::where('code', $code)->first();
|
||||
return self::where('code', $code)->firstOrFail();
|
||||
}
|
||||
|
||||
public function hasBeenUsed()
|
||||
{
|
||||
return $this->user_id !== null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user