public function embed($server_slug, $continent_slug) { // Is valid server? if (!isset($this->servers[$server_slug])) { return App::abort('404'); } $server = $this->servers[$server_slug]; $continent = Continent::where('slug', '=', $continent_slug)->remember(1440)->first(); if (is_null($continent)) { return App::abort('404'); } return View::make('server/embed', compact('server', 'continent')); }
protected function getOptions() { $options[] = ['all', null, InputOption::VALUE_NONE, 'Generate scripts for all continents.', null]; if (Schema::hasTable('continents')) { foreach (Continent::where('enabled', '=', 'yes')->orderBy('name')->get() as $continent) { $options[] = [$continent->slug, null, InputOption::VALUE_NONE, 'Generate script for ' . $continent->name . '.', null]; } } return $options; }