/**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroyClassroomBorrow($id)
 {
     $affect_rows = Loan::where('id', '=', $id)->where('user_id', '=', Auth::user()->id)->where('loan.status', '=', Category::getCategroyId('loan.status', 'submitted'))->update(['status' => Category::getCategoryId('loan.status', 'canceled')]);
     return response()->json(['status' => $affect_rows == 1 ? 0 : 2]);
 }