| @@ 63-77 (lines=15) @@ | ||
| 60 | * |
|
| 61 | * @return void |
|
| 62 | */ |
|
| 63 | public function handle() |
|
| 64 | { |
|
| 65 | $name = $this->qualifyClass($this->getNameInput()) . 'Controller'; |
|
| 66 | ||
| 67 | if ($this->files->exists($path = $this->getPath($name))) |
|
| 68 | { |
|
| 69 | return $this->error($this->type.' already exists!'); |
|
| 70 | } |
|
| 71 | ||
| 72 | $this->makeDirectory($path); |
|
| 73 | ||
| 74 | $this->files->put($path, $this->buildClass($name)); |
|
| 75 | ||
| 76 | $this->info($this->type.' created successfully.'); |
|
| 77 | } |
|
| 78 | ||
| 79 | /** |
|
| 80 | * Get the console command options. |
|
| @@ 54-68 (lines=15) @@ | ||
| 51 | * |
|
| 52 | * @return void |
|
| 53 | */ |
|
| 54 | public function handle() |
|
| 55 | { |
|
| 56 | $name = $this->qualifyClass($this->getNameInput()); |
|
| 57 | ||
| 58 | if ($this->files->exists($path = $this->getPath($name . 'Observer'))) |
|
| 59 | { |
|
| 60 | return $this->error($this->type.' already exists!'); |
|
| 61 | } |
|
| 62 | ||
| 63 | $this->makeDirectory($path); |
|
| 64 | ||
| 65 | $this->files->put($path, $this->buildClass($name)); |
|
| 66 | ||
| 67 | $this->info($this->type.' created successfully.'); |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||