Evercode1\ViewMaker\RemoveFoundation::handle PHP Method

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed
    public function handle()
    {
        $this->folderName = $this->formatModelPath($this->argument('ModelName'));
        $path = base_path('resources/views/' . $this->folderName);
        if ($this->removeViewFiles($path)) {
            $this->sendViewSuccessMessage();
        } else {
            $this->error('No Such Directory');
        }
        $this->modelName = $this->formatModel($this->argument('ModelName'));
        $this->modelPath = $this->formatModelPath($this->argument('ModelName'));
        $this->setPaths();
        if ($this->deleteCrudFiles()) {
            $this->sendSuccessMessage();
            return;
        }
        $this->error('Oops, something went wrong!');
    }