App\Console\Commands\SettingForgetCommand::handle PHP Method

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed
    public function handle()
    {
        try {
            if ($key = $this->argument('key')) {
                Setting::forget($key);
                Setting::save();
                $this->info("Setting [{$key}] has  been forgotten.");
            } else {
                $this->error("Missing 'key' argument.");
            }
        } catch (\Exception $ex) {
            $this->error("Exception: " . $ex->getMessage());
            $this->error("Stack trace: " . $ex->getTraceAsString());
        }
    }
SettingForgetCommand