Update api requests
This commit is contained in:
22
commands/Fiscals.php
Normal file
22
commands/Fiscals.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Commands;
|
||||
|
||||
use App\Component\Models\Terminal;
|
||||
use App\Console\Commands\HRCCommand;
|
||||
use App\Console\Commands\HRCCommandInterface;
|
||||
|
||||
class Fiscals extends HRCCommand implements HRCCommandInterface {
|
||||
protected $signature = 'postfiscals';
|
||||
|
||||
public function command($input, $output = null) {
|
||||
$terminals = Terminal::select('work_code', 'work_group')->where('key', '=', $input['terminal'])->get();
|
||||
foreach ($terminals as $terminal) {
|
||||
$out = array('work_code' => $terminal['work_code'], 'work_group' => $terminal['work_group']);
|
||||
}
|
||||
return [
|
||||
'status' => 'success',
|
||||
'terminal_data' => $out,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user