Esempio n. 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return \Illuminate\Http\Response
  */
 public function postDestroy($id)
 {
     $response['status'] = 'error';
     $response['message'] = trans('products.not_removed');
     if (!empty($id) && intval($id) > 0) {
         if (Model_Products::removeProduct($id) === TRUE) {
             $response['status'] = 'success';
             $response['message'] = trans('products.removed');
         }
     }
     return response()->json($response);
 }