Serverfireteam\Panel\Commands\CreateModelObserverCommand::fire PHP Method

fire() public method

Execute the console command.
public fire ( ) : void
return void
    public function fire()
    {
        $name = $this->parseName($this->getNameInput());
        if ($this->files->exists($path = $this->getPath($name . 'Observer'))) {
            return $this->error($this->type . ' already exists!');
        }
        $this->makeDirectory($path);
        $this->files->put($path, $this->buildClass($name));
        $this->info($this->type . ' created successfully.');
    }
CreateModelObserverCommand