54 lines
1.1 KiB
PHP
54 lines
1.1 KiB
PHP
<?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);
|
|
}
|
|
}
|