예제 #1
0
 /**
  * Execute the command.
  *
  * @param ProductRepository $products
  * @return Product
  */
 public function handle(ProductRepository $products)
 {
     $product = $products->findById($this->id);
     $products->destroy($product);
     return $product;
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return Response
  */
 public function destroy($id)
 {
     $this->productRepository->destroy($id);
     Flash('Producto Eliminado');
     return Redirect()->route('profile.show', Auth()->user()->username);
 }