17 lines
983 B
PHP
17 lines
983 B
PHP
<?php
|
|
namespace App\Modules\Services\Http;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Modules\Services\ServiceFiscal;
|
|
use Illuminate\Http\Request;
|
|
|
|
final class ServiceFiscalController extends Controller
|
|
{
|
|
private function response(array $data) { return response()->json($data)->header('Cache-Control','no-store, private'); }
|
|
public function index(Request $r,ServiceFiscal $f) { return $this->response($f->listing($r->user()->id)); }
|
|
public function propose(Request $r,ServiceFiscal $f) { return $this->response($f->propose($r->user()->id,$r->all())); }
|
|
public function decide(Request $r,int $id,ServiceFiscal $f) { return $this->response($f->decide($id,$r->user()->id,$r->all())); }
|
|
public function calculate(Request $r,int $id,ServiceFiscal $f) { return $this->response($f->calculate($id,$r->user()->id,$r->all())); }
|
|
public function history(Request $r,int $id,ServiceFiscal $f) { return $this->response(['history'=>$f->history($id,$r->user()->id)]); }
|
|
}
|