2021-10-27 16:06:17 +00:00
|
|
|
<?php
|
2021-10-27 17:13:21 +00:00
|
|
|
|
2021-12-04 17:28:11 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2021-10-27 17:13:21 +00:00
|
|
|
use Sarga\API\Http\Controllers\Categories;
|
2021-10-27 16:06:17 +00:00
|
|
|
use Sarga\API\Http\Controllers\Channels;
|
2021-12-06 12:51:25 +00:00
|
|
|
use Sarga\API\Http\Controllers\Awtomtizasia;
|
2021-12-04 17:28:11 +00:00
|
|
|
use Sarga\API\Http\Controllers\Vendors;
|
2021-11-09 17:55:21 +00:00
|
|
|
use Sarga\API\Http\Controllers\Products;
|
2021-10-28 16:36:04 +00:00
|
|
|
use Webkul\API\Http\Controllers\Shop\ResourceController;
|
|
|
|
|
use Webkul\Attribute\Repositories\AttributeOptionRepository;
|
|
|
|
|
use Sarga\API\Http\Resources\Catalog\AttributeOption;
|
2021-10-27 16:06:17 +00:00
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'api'], function ($router) {
|
|
|
|
|
Route::group(['middleware' => ['locale', 'currency']], function ($router) {
|
|
|
|
|
//Channel routes
|
|
|
|
|
Route::get('channels',[Channels::class, 'index']);
|
2021-10-27 17:13:21 +00:00
|
|
|
|
2021-12-04 17:28:11 +00:00
|
|
|
//Vendors
|
|
|
|
|
Route::get('vendors',[Vendors::class,'index']);
|
|
|
|
|
|
2021-10-27 17:13:21 +00:00
|
|
|
//category routes
|
|
|
|
|
Route::get('descendant-categories', [Categories::class, 'index']);
|
|
|
|
|
Route::get('category-brands/{id}', [Categories::class, 'brands']);
|
|
|
|
|
|
2021-10-28 15:30:35 +00:00
|
|
|
//attributes by code
|
2021-10-28 16:36:04 +00:00
|
|
|
Route::get('attribute-options', [ResourceController::class, 'index'])->defaults('_config', [
|
|
|
|
|
'repository' => AttributeOptionRepository::class,
|
|
|
|
|
'resource' => AttributeOption::class,
|
2021-10-28 15:30:35 +00:00
|
|
|
]);
|
|
|
|
|
|
2021-11-09 17:55:21 +00:00
|
|
|
//Product routes
|
|
|
|
|
Route::get('products', [Products::class, 'index']);
|
|
|
|
|
|
|
|
|
|
Route::get('products/{id}', [Products::class, 'get']);
|
2021-10-27 16:06:17 +00:00
|
|
|
});
|
2021-12-06 11:52:58 +00:00
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'scrap','middleware' =>['scrap']], function ($router){
|
2021-12-06 12:51:25 +00:00
|
|
|
Route::put('upload',[Awtomtizasia::class,'bulk_upload']);
|
2021-12-06 11:52:58 +00:00
|
|
|
});
|
2021-10-27 16:06:17 +00:00
|
|
|
});
|