This commit is contained in:
58
api/app/Http/Controllers/Almoxarifado/EntradaController.php
Normal file
58
api/app/Http/Controllers/Almoxarifado/EntradaController.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user