Conditions | 2 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function handle() |
||
33 | { |
||
34 | $hook = new Webhook(); |
||
35 | $hook->url = $this->argument('url'); |
||
36 | $hook->event = $this->argument('event'); |
||
37 | try { |
||
38 | $hook->save(); |
||
39 | $this->info('The webhook was saved successfully.'); |
||
40 | $this->info('Event: '.$hook->event); |
||
41 | $this->info('URL: '.$hook->url); |
||
42 | } catch (Exception $e) { |
||
43 | $this->error("The webhook couldn't be added to the database ".$e->getMessage()); |
||
44 | } |
||
45 | } |
||
46 | } |
||
47 |