/** * Check whether an option is set in the options aray. * * @param string $provides * @param array $options * * @return bool */ protected function isOptionSet($provides, $options = []) { if (isset($options[$provides]) && $options[$provides] === true) { return true; } elseif (!isset($options[$provides]) && Options::options()[$provides]->isDefault()) { return true; } return false; }
public function index() { $options = Options::options(); return view('minify.index', compact('options')); }
/** * Get the console command options. * * @return array */ protected function getOptions() { $options = Collection::make(Options::options())->map(function (Option $option) { return [$option->getName(), null, InputOption::VALUE_NONE, $option->getDescription()]; })->all(); $options[Options::ALL] = [Options::ALL, 'a', InputOption::VALUE_NONE, 'Use all the minification rules available']; return $options; }