feat: introduce ProductCategoryResource and refactor database migrations by deleting old tables and consolidating transaction schema.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Controllers\Api\Service;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Resources\Api\Service\ProductCategoryResource;
|
||||
use App\Http\Resources\Api\Service\ServiceResource;
|
||||
use App\Models\Product;
|
||||
use App\Models\ProductCategories;
|
||||
@@ -63,7 +64,7 @@ class ProductCategoryController extends Controller
|
||||
return response()->json([
|
||||
'error' => false,
|
||||
'message' => 'Lấy dữ liệu thành công',
|
||||
'data' => $categories,
|
||||
'data' => ProductCategoryResource::collection($categories),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user