This commit is contained in:
53
api/app/Http/Controllers/Almoxarifado/SaidaController.php
Normal file
53
api/app/Http/Controllers/Almoxarifado/SaidaController.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Almoxarifado;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Services\Almoxarifado\SaidaService;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class SaidaController extends Controller
|
||||
{
|
||||
protected $modulo = 'almoxarifado';
|
||||
protected $funcionalidade = 'saida';
|
||||
|
||||
public function datatable()
|
||||
{
|
||||
return SaidaService::datatable();
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::create(), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function store()
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::store(), Response::HTTP_CREATED);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::edit($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function update($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::update($id), Response::HTTP_OK);
|
||||
}
|
||||
|
||||
public function destroy($id)
|
||||
{
|
||||
$this->auth(__FUNCTION__);
|
||||
|
||||
return response()->json(SaidaService::destroy($id), Response::HTTP_NO_CONTENT);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user