1 | <?php |
||
8 | class LicenseUpdate extends Command |
||
9 | { |
||
10 | /** |
||
11 | * The name and signature of the console command. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $signature = 'license:update {--quantity=?} {--license=?} {--owner_type=?} {--owner_id=?}'; |
||
16 | |||
17 | /** |
||
18 | * The console command description. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $description = 'Updates a license quantity'; |
||
23 | |||
24 | /** |
||
25 | * Execute the console command. |
||
26 | * |
||
27 | * @return mixed |
||
28 | */ |
||
29 | public function handle() |
||
45 | |||
46 | protected function getQuantity($current = 0) |
||
47 | { |
||
48 | return intval($this->option("quantity") ?: $this->ask("Please select a new maximum value for this license. (The current maximum is {$current})")); |
||
49 | } |
||
50 | |||
51 | protected function selectLicense($where = []) |
||
55 | |||
56 | protected function selectOwnerType($where = []) |
||
60 | |||
61 | protected function selectOwnerId($where = []) |
||
65 | |||
66 | final protected function getSelection($column, $where = []) |
||
87 | } |