Unify is clamed on Invite like we do on Subscriber

This commit is contained in:
Joseph Cohen
2015-12-09 18:36:17 -06:00
parent 2f526d6cb3
commit 4c5a12ec89
2 changed files with 3 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ class SignupController extends Controller
$invite = Invite::where('code', '=', $code)->first();
if (!$invite || $invite->claimed()) {
if (!$invite || $invite->is_claimed) {
throw new BadRequestHttpException();
}
@@ -67,7 +67,7 @@ class SignupController extends Controller
$invite = Invite::where('code', '=', $code)->first();
if (!$invite || $invite->claimed()) {
if (!$invite || $invite->is_claimed) {
throw new BadRequestHttpException();
}

View File

@@ -60,7 +60,7 @@ class Invite extends Model
*
* @return bool
*/
public function claimed()
public function getIsClaimedAttribute()
{
return $this->claimed_at !== null;
}