This commit is contained in:
2025-09-25 03:03:31 +05:00
commit ae480cf2f6
2768 changed files with 1485826 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,
])
);
}
}