corp rental moons

This commit is contained in:
2020-04-26 01:26:11 -05:00
parent 6a26f4bc6e
commit 59c0de75c4
6 changed files with 119 additions and 115 deletions

View File

@@ -10,6 +10,7 @@ use App\Models\User\UserRole;
use App\Models\User\UserPermission;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\MoonRent\MoonRental;
class User extends Authenticatable
{
@@ -117,4 +118,16 @@ class User extends Authenticatable
return $role->role;
}
public function isMoonRenter() {
$moonRental = MoonRent::where([
'Contact' => $this->character_id,
])->first();
if($moonRental != null) {
return true;
} else {
return false;
}
}
}