| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function handle() |
||
| 32 | { |
||
| 33 | $name = $this->argument('name'); |
||
| 34 | $label = $this->argument('label'); |
||
| 35 | $c = Collection::firstOrNew(['name' => $name, 'label' => $label]); |
||
| 36 | if ($c->isDirty()) { |
||
| 37 | $this->info("Created collection '$name'."); |
||
| 38 | $c->save(); |
||
| 39 | } else { |
||
| 40 | $this->info("Collection '$name' already exists."); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |