feat: Implement API endpoints for retrieving product categories and their associated products.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
use App\Http\Controllers\Api\Setting\SettingController;
|
||||
use App\Http\Controllers\Api\Client\ClientController;
|
||||
use App\Http\Controllers\Api\Service\OrderController;
|
||||
use App\Http\Controllers\Api\Service\ProductCategoryController;
|
||||
use App\Http\Controllers\Api\Service\ServiceController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
@@ -42,6 +43,15 @@ Route::prefix('v1')->group(function () {
|
||||
Route::get('/', 'getSetting')->name('get');
|
||||
});
|
||||
});
|
||||
|
||||
// Product Categories - Protected Routes
|
||||
Route::middleware(['api.auth'])->prefix('group')->as('product-categories.')->group(function () {
|
||||
Route::controller(ProductCategoryController::class)->group(function () {
|
||||
Route::get('get-list', 'getCategories')->name('getList');
|
||||
Route::get('{product_categories:slug}', 'getDetailCategory')->name('detail');
|
||||
Route::get('{parentSlug}/{childSlug}', 'getChildCategoryWithParent')->name('childWithParent');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user