/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $groups = ['0' => 'Select User Group'] + UserGroup::select('id', 'group_name')->orderBy('group_name')->lists('group_name', 'id')->toArray(); $user = User::with('group')->findOrFail($id); $agencies = Agency::orderBy('name')->lists('name', 'id'); $dentists = Dentist::orderBy('name')->lists('name', 'id'); $data = array('user' => $user, 'groups' => $groups, 'agencies' => $agencies, 'dentists' => $dentists, 'pageTitle' => 'ODRMS - User Management - Edit: ' . $user->name); return view('libraries.users.edit', $data); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $agencies = Agency::orderBy('code')->simplePaginate($this->recPerPage); return view('libraries.agencies.index', ['agencies' => $agencies, 'pageTitle' => 'ODRMS - Agencies']); }