File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
app/Http/Controllers/Seller Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,14 @@ public function productListOfTrash(){
4141 return ProductResource::collection ($ products );
4242 }
4343
44- /**
45- * Store a newly created resource in storage.
46- */
44+ public function productListOfRejected (){
45+ $ shop = Shop::where ('user_id ' , Auth::guard ('api ' )->user ()->id )->first ();
46+ $ products =Product::where ('shop_id ' ,$ shop ->id )->orderBy ("created_at " ,"desc " )
47+ ->where ("isReject " ,1 )
48+ ->get ();
49+
50+ return ProductResource::collection ($ products );
51+ }
4752 public function store (Request $ request )
4853 {
4954 try {
Original file line number Diff line number Diff line change 194194
195195 Route::post ('/put/in/trash/{id} ' ,[ProductController::class,'putInTrash ' ]);
196196 Route::get ('/trash/products ' ,[ProductController::class,'productListOfTrash ' ]);
197+ Route::get ("/reject/products " ,[ProductController::class,"productListOfRejected " ]);
197198 Route::post ("/restore/product/{id} " ,[ProductController::class,'restoreProduct ' ]);
198199 // Routes pour la gestion des commandes du vendeur
199200 Route::get ('/seller/orders ' , [OrderListController::class, 'listOrders ' ]);
You can’t perform that action at this time.
0 commit comments