Advertisement
Guest User

Untitled

a guest
May 29th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. public function index(Request $request) {
  2.  
  3.         $appointments = Appointment::all();
  4.        
  5.         if($request->wantsJson()) {
  6.             return response()->json($appointments);
  7.         }
  8.  
  9.         return view('appointments.index', compact('appointments'));
  10.  
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement