예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $permissions = Cache::get('admin.perm.list');
     if (!$this->isLoggedIn || !$this->user->ability(null, $permissions['scoreboard'])) {
         throw new AccessDeniedHttpException();
     }
     $id = Input::get('server_id');
     if (!is_numeric($id) || !filter_var($id, FILTER_VALIDATE_INT, ['options' => ['min_range' => 1]])) {
         throw new NotFoundHttpException('Invalid Server ID');
     }
     try {
         $this->server = Server::findOrFail($id);
     } catch (ModelNotFoundException $e) {
         throw new NotFoundHttpException(sprintf('No server found with id of %s.', $id));
     }
     $this->repository = App::make('BFACP\\Repositories\\Scoreboard\\LiveServerRepository', [$this->server])->attempt();
     if (Input::has('players')) {
         $this->players = array_map('trim', explode(',', Input::get('players')));
     }
 }
예제 #2
0
 public function __construct(BanRepository $repo)
 {
     parent::__construct();
     $this->repository = $repo;
 }
예제 #3
0
 public function __construct(Metabans $metabans)
 {
     parent::__construct();
     $this->metabans = $metabans;
 }
예제 #4
0
 public function __construct(PlayerRepository $repository)
 {
     parent::__construct();
     $this->repository = $repository;
 }
예제 #5
0
 public function __construct(Chat $chat, Server $server)
 {
     parent::__construct();
     $this->chat = $chat;
     $this->server = $server;
 }