/**
  * Show the form for editing the specified repair.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     if (!Sentry::getUser()) {
         return Redirect::route('sessions.create');
     }
     $repair = Repair::find($id);
     return View::make('repairs.edit', compact('repair'));
 }
 public function getDeleteRepairHistory($id)
 {
     $repair = Repair::find($id);
     $audit = AuditTrail::create(['user_id' => Auth::id(), 'role' => 'Property Management Admin', 'action' => 'printed the list of assigned properties.']);
     if (!$repair) {
         App::abort(404);
     }
     $repair->delete();
     // $audit = AuditTrail::create([
     // 'user_id'	=>	Auth::id(),
     // 'role'		=>  'Employee Management Admin',
     // 'action'	=>	'deleted USER "'.$user->firstname.' '.$user->lastname.'".'
     // ]);
     return Redirect::route('repair-history', $repair->property->id)->with('alert', 'success|Repair entry has been deleted');
 }
 /**
  * Show the form for editing the specified repair.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $repair = Repair::find($id);
     return View::make('repairs.edit', compact('repair'));
 }