Merge pull request #1216 from cachethq/unify-is-getters

Unify is clamed on Invite like we do on Subscriber
This commit is contained in:
Joe Cohen
2015-12-09 19:07:19 -06:00
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;
}