public function getEnvironment()
{
$environment = $this->Input->old('environment', env('APP_ENV'));
$environment = $environment === 'custom' ? $this->Input->old('custom_environment', 'myenv') : $environment;
$selectedEnvironment = function ($env, $yes = 'selected', $no = '') use($environment) {
if (!in_array($environment, ['local', 'staging', 'production'])) {
return $env == 'local' ? $yes : $no;
}
return $env == $environment ? $yes : $no;
};
return $this->View->make('devise::installer.environment', compact('environment', 'selectedEnvironment'));
}