Evercode1\ViewMaker\MakeFoundation::handle PHP Method

handle() public method

Execute the console command.
public handle ( ) : mixed
return mixed
    public function handle()
    {
        // setup for crud
        $this->modelName = $this->formatModel($this->argument('ModelName'));
        $this->slug = $this->argument('Slug');
        $this->setCrudTokens();
        $this->setFilePaths();
        // setup for views
        $this->setConfigFromInputs();
        // runs all commands
        if ($this->makeCrudFiles() && $this->makeViewDirectory()->makeViewFiles($this->templateType)) {
            $this->sendSuccessMessage();
            return;
        }
        $this->error('Oops, something went wrong!');
    }