| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | public function handle() |
||
| 53 | { |
||
| 54 | if(!$tenant = $this->tenants->findById($this->argument('id'))) { |
||
| 55 | $this->error('Cannot find a tenant #' . $this->argument('id')); |
||
| 56 | return; |
||
| 57 | } |
||
| 58 | |||
| 59 | $this->renderTenants($tenant, 'Found a deleted tenant'); |
||
| 60 | |||
| 61 | if(!$this->confirm('Would you like to restore it?')) { |
||
| 62 | return; |
||
| 63 | } |
||
| 64 | |||
| 65 | $tenant->restore(); |
||
| 66 | |||
| 67 | $this->info('The tenant #' . $tenant->id . ' successfully restored.'); |
||
| 68 | } |
||
| 69 | } |