added fleets displays added scopes display modified routes file added Fleet file in class Library modified Finances Controller add EsiScopesController laid out fleet framework file in class library
30 lines
522 B
PHP
30 lines
522 B
PHP
<?php
|
|
|
|
use App\Models\CreateEsiScopes;
|
|
|
|
use DB;
|
|
|
|
class Esi {
|
|
|
|
/**
|
|
* Check if a scope is in the database for a particular character
|
|
*
|
|
* @param charId
|
|
* @param scope
|
|
*
|
|
* @return true,false
|
|
*/
|
|
public function CheckScope($charId, $scope) {
|
|
$checks = DB::table('EsiScopes')->where('character_id', $charId)->get();
|
|
foreach($checks as $check) {
|
|
if($check === $scope){
|
|
return true;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|