This commit is contained in:
2026-02-03 15:31:29 +05:00
commit 326c677e8d
2800 changed files with 1489388 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\Api\V1\PostBranch;
use App\Http\Controllers\Controller;
use App\Models\Post\PostBranch;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
class PostBranchController extends Controller
{
/**
* All post branches
*/
public function index(Request $request): JsonResponse
{
return response()->rest(
PostBranch::query()
->get()
->map(fn ($postBranch) => [
'id' => $postBranch->id,
'province_id' => $postBranch->province_id,
'name' => $postBranch->name,
'address' => $postBranch->address,
'description' => $postBranch->description,
])
);
}
}