| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function handle() |
||
| 14 | { |
||
| 15 | $url = $this->argument('url'); |
||
| 16 | |||
| 17 | $monitor = Monitor::where('url', $url)->first(); |
||
| 18 | |||
| 19 | if (! $monitor) { |
||
| 20 | $this->error("Monitor {$url} is not configured"); |
||
| 21 | |||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | if ($this->confirm("Are you sure you want stop monitoring {$monitor->url}?")) { |
||
| 26 | $monitor->delete(); |
||
| 27 | |||
| 28 | $this->warn("{$monitor->url} will not be monitored anymore"); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 |