Files
w4rpservices/app/Library/Esi.php
2018-11-17 01:31:48 -06:00

30 lines
515 B
PHP

<?php
use App\Models\EsiScope;
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;
}
}
?>