Conditions | 5 |
Paths | 8 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | public function handle() |
||
49 | { |
||
50 | try { |
||
51 | $id = $this->argument('id') ? $this->argument('id') : $this->askForTasks(); |
||
52 | $task = Task::findOrFail($id); |
||
53 | $task->update([ |
||
54 | 'name' => $this->argument('name') ? $this->argument('name') : $this->ask('Task name?'), |
||
55 | 'user_id' => $this->argument('user_id') ? $this->argument('user_id') : $this->askForUsers(), |
||
56 | ]); |
||
57 | } catch (Exception $e) { |
||
58 | $this->error('Error'); |
||
59 | } |
||
60 | $this->info('Task has been edited to database succesfully'); |
||
61 | } |
||
63 |