Add product deletion
This commit is contained in:
parent
385fab9955
commit
3a1b75d9d7
|
|
@ -326,4 +326,10 @@ class SellerProduct extends SellerProductController
|
|||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteProduct($product_id)
|
||||
{
|
||||
$this->productRepository->delete($product_id);
|
||||
return response()->json(['success' => true]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ Route::group(['prefix' => 'api'], function () {
|
|||
Route::get('products/{vendor_id}/{product_id}',[Vendors::class,'sellerProductsById']);
|
||||
Route::post('create/product', [SellerProduct::class, 'storeSellerProd']);
|
||||
Route::post('update/product', [SellerProduct::class, 'updateProductFlat']);
|
||||
Route::post('delete/product/{product_id}', [SellerProduct::class, 'deleteProduct']);
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['locale', 'currency']], function () {
|
||||
|
|
|
|||
Loading…
Reference in New Issue