Example #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $user = JWTAuth::parseToken()->authenticate();
     if (!Controller::supreme($user->role)) {
         return Controller::response(Controller::error(13), 401);
     }
     $response = $this->category->deleteCategory($id);
     return Controller::response($response, 204);
 }
Example #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Category::deleteCategory($id);
     return redirect()->action('Admin\\CategoryController@index')->with('message', 'Item deleted successfully.');
 }