Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function index(Request $request) {
- $appointments = Appointment::all();
- if($request->wantsJson()) {
- return response()->json($appointments);
- }
- return view('appointments.index', compact('appointments'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement