Conditions | 3 |
Paths | 3 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | public function handle() |
||
15 | { |
||
16 | $this->warn("Let's create your new uptime monitor!"); |
||
17 | |||
18 | $url = $this->ask('Specify the url of the uptime monitor that should be deleted'); |
||
19 | |||
20 | $site = Site::where('url', $url)->first(); |
||
21 | |||
22 | if (! $site) { |
||
23 | $this->error("There is no uptime monitor for url {$url}"); |
||
24 | |||
25 | return; |
||
26 | } |
||
27 | |||
28 | if ($this->confirm("Are you sure you want to delete the uptime monitor for {$site->url}?")) { |
||
29 | $site->delete(); |
||
30 | |||
31 | $this->warn("Uptime monitor {$url} deleted!"); |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 |