public function render($delimiter = ' | ') { if (App::isLocal() || !$this->_local_only) { $credential_links = []; foreach ($this->_link_data as $link_values) { $label = $link_values['label']; $js_code = $this->js_code($link_values['credentials']); $credential_links[] = '<a href="#" onclick="' . $js_code . '">' . $label . '</a>'; } return implode($delimiter, $credential_links); } return ''; }
private function resetDatabase() { $env = App::environment(); $this->output->writeln("Truncating tables in {$env} environment"); if (App::isLocal()) { foreach ($this->tables as $table) { $this->output->writeln("Truncating {$table}"); DB::statement('TRUNCATE TABLE ' . $table . ' CASCADE;'); } } elseif (App::runningUnitTests()) { Eloquent::unguard(); foreach ($this->tables as $table) { $this->output->writeln("Truncating {$table}"); DB::statement('TRUNCATE TABLE ' . $table . ' CASCADE;'); } } }
public function __construct() { if (!App::isLocal()) { throw new Exception('DO NOT SEED IN PRODUCTION'); } }