Ejemplo n.º 1
0
 protected function write($data)
 {
     $destination = $this->composer->getClassPath($this->data['name']);
     if ($this->force && $this->external->has($destination)) {
         $this->external->delete($destination);
     }
     return $this->external->write($destination, $data);
 }
Ejemplo n.º 2
0
 public function fire()
 {
     $data = ['name' => $this->argument('name')];
     $result = $this->generator->setData($data)->setForce($this->option('force'))->make();
     if ($result) {
         $this->info('Interface: ' . $this->composer->getClassPath($this->argument('name')) . ' created');
     } else {
         $this->error('Something went wrong!');
     }
 }