img search test
This commit is contained in:
parent
69e2af5f18
commit
6cb2d5493a
|
|
@ -16,6 +16,7 @@ use Sarga\Shop\Repositories\AttributeOptionRepository;
|
|||
use Webkul\Product\Repositories\ProductFlatRepository;
|
||||
use Sarga\API\Http\Controllers\Banners as Slider;
|
||||
use Webkul\Core\Repositories\SliderRepository;
|
||||
use Webkul\Product\Repositories\SearchRepository;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class Products extends ProductController
|
||||
|
|
@ -192,4 +193,9 @@ class Products extends ProductController
|
|||
{
|
||||
return ProductResource::collection($this->productRepository->getPopularProducts(request()->input('category')));
|
||||
}
|
||||
|
||||
public function searchImg(SearchRepository $searchRepository)
|
||||
{
|
||||
return $searchRepository->uploadSearchImage(request()->all());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ Route::group(['prefix' => 'api'], function () {
|
|||
]);
|
||||
|
||||
Route::get('home', [Products::class, 'home']);
|
||||
Route::post('search/image', [Products::class, 'searchImg']);
|
||||
|
||||
//Product routes
|
||||
Route::get('products', [Products::class, 'index']);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
|
|||
'view' => 'shop::search.search',
|
||||
])->name('shop.search.index');
|
||||
|
||||
Route::post('/upload-search-image', [HomeController::class, 'upload'])->name('shop.image.search.upload');
|
||||
Route::post('/upload-search-image', [HomeController::class, 'upload'])->name('');
|
||||
|
||||
/**
|
||||
* Subscription routes.
|
||||
|
|
|
|||
Loading…
Reference in New Issue