/** @test */
 public function verify_loan()
 {
     $loan = Loan::find($this->getTestLoanId());
     $this->call('PUT', '/class-verify/' . $loan->getAttribute('id'), ['status' => $this->randomCategoryName('loan.status')]);
     $this->assertResponseOk();
     $this->seeJson();
 }
 /**
  * Display a list of the conflicted classroom borrow record with input request
  *
  * @param int loan_id
  * @return Json
  */
 public function indexConflictClassroomBorrow($loan_id)
 {
     if (($loan = Loan::find($loan_id)) === null) {
         return response()->json(['status' => 2]);
     }
     $sample = ['p_id' => $loan->property_id, 'dates' => [$loan->date_began_at, $loan->date_ended_at], 'times' => [$loan->time_began_at, $loan->time_ended_at], 'LTK' => $loan->long_term_token];
     $conflict_list = Loan::getConflictList($sample)->join('users', 'users.id', '=', 'loans.user_id')->where('loans.id', '!=', $loan_id)->get(['loans.*', 'users.username', 'users.email', 'users.phone']);
     return response()->Json($conflict_list);
 }