Files
rkm-conectasus-ci-sandbox/api/app/Http/Controllers/Externo/Almoxarifado/Cliente/MaterialController.php
Antonio Lopes dos Santos afec302c3e
All checks were successful
build-api-image / build (push) Successful in 51s
init commit
2026-08-04 16:52:02 -03:00

51 lines
1.2 KiB
PHP

<?php
namespace App\Http\Controllers\Externo\Almoxarifado\Cliente;
use App\Http\Controllers\Externo\Almoxarifado\Controller;
use App\Services\WebService\Almoxarifado\Cliente\MaterialService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class MaterialController extends Controller
{
protected $controller = __CLASS__;
public function index()
{
$this->auth(__FUNCTION__);
return response()->json(MaterialService::index(), Response::HTTP_OK);
}
public function show($id)
{
$this->auth(__FUNCTION__);
return response()->json(MaterialService::show($id), Response::HTTP_OK);
}
public function store(Request $request)
{
$this->auth(__FUNCTION__);
return response()->json(MaterialService::store($request), Response::HTTP_CREATED);
}
public function update(Request $request, $id)
{
$this->auth(__FUNCTION__);
return response()->json(MaterialService::update($request, $id), Response::HTTP_OK);
}
public function destroy($id)
{
$this->auth(__FUNCTION__);
MaterialService::destroy($id);
return response()->noContent();
}
}