Files
SGF/app/Modules/Industry/Http/IndustrialBudgetsController.php
T

13 lines
952 B
PHP

<?php
namespace App\Modules\Industry\Http;
use App\Http\Controllers\Controller;
use App\Modules\Industry\IndustrialBudgets;
use Illuminate\Http\Request;
final class IndustrialBudgetsController extends Controller {
private function response(array $d){return response()->json($d)->header('Cache-Control','no-store, private');}
public function index(Request $r,IndustrialBudgets $c){return $this->response($c->listing($r->user()->id));}
public function propose(Request $r,int $id,IndustrialBudgets $c){return $this->response($c->propose($id,$r->user()->id,$r->all(),(string)$r->header('Idempotency-Key')));}
public function decide(Request $r,int $id,IndustrialBudgets $c){return $this->response($c->decide($id,$r->user()->id,$r->all(),(string)$r->header('Idempotency-Key')));}
public function compare(Request $r,int $id,IndustrialBudgets $c){return $this->response($c->compare($id,$r->user()->id,$r->all(),(string)$r->header('Idempotency-Key')));}
}