firstOrFail(); } public function user() { return $this->belongsTo(User::class); } public function hasBeenUsed() { return $this->user_id !== null; } }