added new functions to the user model for srp

created new admin lte dashboard for regular users
created sub files to break up the admin lte dashboard for regular users if the dashboard is fully utilized.
This commit is contained in:
2020-04-29 02:37:14 -05:00
parent 754fbb9aad
commit 346fcd746f
10 changed files with 825 additions and 40 deletions

View File

@@ -11,6 +11,7 @@ use App\Models\User\UserPermission;
use App\Models\Esi\EsiScope;
use App\Models\Esi\EsiToken;
use App\Models\MoonRent\MoonRental;
use App\Models\SRP\SRPShip;
class User extends Authenticatable
{
@@ -130,4 +131,26 @@ class User extends Authenticatable
return false;
}
}
public function srpOpen() {
return SRPShip::where([
'character_id' => $this->character_id,
'approved' => 'Under Review',
])->count();
}
public function srpDenied() {
return SRPShip::where([
'character_id' => $this->character_id,
'approved' => 'Denied',
])->count();
}
public function srpAccepted() {
return SRPShip::where([
'character_id' => $this->character_id,
'approved' => 'Approved',
])->count();
}
}