This commit is contained in:
2026-05-08 20:49:37 +05:00
commit bb5d03bf86
2758 changed files with 1485998 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,
])
);
}
}