Esempio n. 1
0
 public function edit($id)
 {
     $page = Page::find($id);
     $roles = array_merge([null => trans('site::page.role.none')], Role::lists('display_name', 'name')->all());
     $locales = config('app.locales');
     return view('site::admin.pages.edit')->with(['page' => $page, 'roles' => $roles, 'locales' => $locales]);
 }
Esempio n. 2
0
 public function edit($id)
 {
     /** @var User $user */
     $user = User::find($id);
     $roles = Role::lists('display_name', 'id')->all();
     $genders = [null => trans('user::profile.gender.none'), 'male' => trans('user::profile.gender.male'), 'female' => trans('user::profile.gender.female')];
     $locales = config('app.locales');
     return view('user::admin.users.edit')->with(['user' => $user, 'roles' => $roles, 'genders' => $genders, 'locales' => $locales]);
 }