59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Almoxarifado;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\Almoxarifado\EntradaService;
|
|
use Illuminate\Http\Response;
|
|
|
|
class EntradaController extends Controller
|
|
{
|
|
protected $modulo = 'almoxarifado';
|
|
protected $funcionalidade = 'entrada';
|
|
|
|
public function datatable()
|
|
{
|
|
return EntradaService::datatable();
|
|
}
|
|
|
|
public function create()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(EntradaService::create(), Response::HTTP_OK);
|
|
}
|
|
|
|
public function store()
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(EntradaService::store(), Response::HTTP_CREATED);
|
|
}
|
|
|
|
public function edit($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(EntradaService::edit($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function update($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(EntradaService::update($id), Response::HTTP_OK);
|
|
}
|
|
|
|
public function destroy($id)
|
|
{
|
|
$this->auth(__FUNCTION__);
|
|
|
|
return response()->json(EntradaService::destroy($id), Response::HTTP_NO_CONTENT);
|
|
}
|
|
|
|
public function list()
|
|
{
|
|
return response()->json(EntradaService::list(), Response::HTTP_OK);
|
|
}
|
|
}
|