init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\Example;
use App\Services\ExampleService;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class ExampleController extends Controller
{
protected $modulo = 'modulo';
protected $funcionalidade = 'funcionalidade';
public function index()
{
$this->auth(__FUNCTION__);
return response()->json($this->get(Example::class)->get(), Response::HTTP_OK);
}
public function create()
{
$this->auth(__FUNCTION__);
// ...
}
public function store(Request $request)
{
$this->auth(__FUNCTION__);
return response()->json(ExampleService::store($request->all()), Response::HTTP_CREATED);
}
public function show($id)
{
$this->auth(__FUNCTION__);
return response()->json($this->get(Example::class, $id), Response::HTTP_OK);
}
public function edit($id)
{
$this->auth(__FUNCTION__);
// ...
}
public function update(Request $request, $id)
{
$this->auth(__FUNCTION__);
return response()->json(ExampleService::update($id, $request->all()), Response::HTTP_OK);
}
public function destroy($id)
{
$this->auth(__FUNCTION__);
return response()->json(ExampleService::destroy($id), Response::HTTP_NO_CONTENT);
}
}