Show the form for editing the specified resource.

@param  int  $id

@return void
540778
public function edit($id)
    {
        $roles = Role::select('id', 'name', 'label')->get();
        $roles = $roles->pluck('label', 'name');

        $user = User::with('roles')->select('id', 'name', 'email')->findOrFail($id);
        $user_roles = [];
        foreach ($user->roles as $role) {
            $user_roles[] = $role->name;
        }

        return view('admin.users.edit', compact('user', 'roles', 'user_roles'));
    }
339665
public function edit(string $id = null): void
    {
        $menu = $this->Menus->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $data = (array)$this->request->getData();
            $menu = $this->Menus->patchEntity($menu, $data);
            if ($this->Menus->save($menu)) {
                $this->Flash->success((string)__('The menu has been saved.'));
                $this->redirect(['action' => 'index']);

                return;
            } else {
                $this->Flash->error((string)__('The menu could not be saved. Please, try again.'));
            }
        }
        $this->set('navMenu', $menu);
        $this->set('_serialize', ['navMenu']);
    }
344742
public function actionEdit($id)
    {
        $model = $this->findModel($id);
        $form  = new LanguageForm($model);
        if (Yii::$app->request->isAjax && $form->load(Yii::$app->request->post())){
            if (!$errors = ActiveForm::validate($form)) {
                try {
                    $this->service->edit($form->id, $form);
                    $this->output['status'] = 1;
                } catch (YiiException $e) {
                    $errors = ErrorHelper::checkModel($e->data, $form);
                }
            }
            return $this->output['errors'] = $errors;
        }
        return $this->render('edit', ['model' => $form]);
    }
1232360
public function update_($resource, ...$id) {
		$this->_checkResource ( $resource, function () use ($id) {
			if (! $this->hasErrors ()) {
				parent::_update ( ...$id );
			} else {
				echo $this->displayErrors ();
			}
		} );
	}
559748
public function edit(string $id)
    {
        $this->request->allowMethod('put');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $success = false;
        if (null !== $entity) {
            Assert::isInstanceOf($entity, EntityInterface::class);
            $entity = $this->SavedSearches->patchEntity($entity, (array)$this->request->getData());
            $success = (bool)$this->SavedSearches->save($entity);
        }

        $this->set('success', $success);
        $success ?
            $this->set('data', []) :
            $this->set('error', 'The saved search could not be saved. Please, try again.');
        $this->set('_serialize', ['success', 'data', 'error']);
    }
907206
public function handleDelete(int $id): void
	{
		if ($this->isAjax() && $this->editConst) {
			$content = $this->orm->content->getById($id);
			$this->orm->content->removeAndFlush($content);
			$this['list']->reload();
		} else {
			$this->terminate();
		}
	}
104045
public function edit($id) {
        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('edit'))
        {
            Session::flash('status_code', 400 );
            $message = "You are not allowed to edit ".$this->model->table;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'        => $this->model->package_title,
                'table_type_plural'    => $this->model->table,
                'table_type_singular'  => strtolower($this->model->model_class),
                'resource_route_name'  => $this->model->resource_route_name,
                'HTMLHelper'           => HTMLHelper::class,
            ]);
        }


        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $modelClass = HTMLHelper::properPlural($this->model->model_class);

            $message = "This ".$modelClass." is not available for editing, as someone else is currently editing this ".$modelClass.".";
            Session::flash('message', $message);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
        }

        // Lock the record
        $this->repository->populateLockFields($id);

        // Are there mandatory related tables that have no records? If so, can't create/edit
        $isNotNullableRelatedTablesWithNoRecords = $this->repository->isNotNullableRelatedTablesWithNoRecords($this->getFieldList());

        if ($isNotNullableRelatedTablesWithNoRecords['mandatory_no_records'])
        {
            Session::flash('status_code', 400 );
            $message  = "You are not allowed to update ".HTMLHelper::pluralToSingular($this->model->table)." because ";
            $message .= "there are no enabled records in the ";

            if ( !empty($isNotNullableRelatedTablesWithNoRecords['field']['alternate_form_name']) )
            {
                $message .= $isNotNullableRelatedTablesWithNoRecords['field']['alternate_form_name'];
            } else {
                $message .= $isNotNullableRelatedTablesWithNoRecords['field']['name'];
            }

            $message .= ' table. You must add enabled records to the "';
            $message .= $isNotNullableRelatedTablesWithNoRecords['field']['related_table_name'];

            $message .= '" table first!';
            Session::flash('message', $message);
            return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
        }


        return view('formhandling::adminformhandling/' . config('lasallecmsadmin.admin_template_name') . '/edit',
        [
            'repository'                   => $this->repository,
            'record'                       => $this->repository->getFind($id),
            'package_title'                => $this->model->package_title,
            'table_name'                   => $this->model->table,
            'model_class'                  => $this->model->model_class,
            'resource_route_name'          => $this->model->resource_route_name,
            'field_list'                   => $this->getFieldList(),
            'namespace_formprocessor'      => $this->model->namespace_formprocessor,
            'classname_formprocessor_update' => $this->model->classname_formprocessor_update,
            'DatesHelper'                  => DatesHelper::class,
            'HTMLHelper'                   => HTMLHelper::class,
            'carbon'                       => Carbon::class,
            'Config'                       => Config::class,
            'Form'                         => Form::class,
            'admin_size_input_text_box'    => Config::get('lasallecmsadmin.admin_size_input_text_box'),
            'Crypt'                        => Crypt::class,
        ]);
    }
843114
public function edit($id)
    {
        $post = $this->noticiaRepo->findOrFail($id);
        $categorias = $this->categoriaRepo->listPub();
        $tags = $this->tagRepo->listPub();

        return view('admin.noticias.edit', compact('post','categorias','tags'));
    }
1051208
public function edit($id)
    {
        $team = $this->service->find($id);
        return view('team.edit')->with('team', $team);
    }
162366
public function edit($id)
    {
        $permission = $this->permissions->findById($id);
        $roleIds = $this->permissions->getRoles();

        if (! $permission) {
            return $this->handleError(trans('soda::errors.not-found', ['object' => 'permission']));
        }

        app('soda.interface')->setHeading($permission->display_name);
        app('soda.interface')->breadcrumbs()->addLink(route('soda.permissions.index'), 'Permissions');

        return soda_cms_view('data.permissions.view', compact('permission', 'roleIds'));
    }
383693
public function edit($id)
    {
        $this->loadModel('User.Users');
        $user = $this->Users->get($id, ['contain' => ['Roles']]);
        $languages = LocaleToolbox::languagesList();
        $roles = $this->Users->Roles->find('list', [
            'conditions' => [
                'id NOT IN' => [ROLE_ID_AUTHENTICATED, ROLE_ID_ANONYMOUS]
            ]
        ]);

        if ($this->request->data()) {
            $user->accessible(['id', 'username'], false);
            $user = $this->Users->patchEntity($user, $this->request->data);
            if ($this->Users->save($user)) {
                $this->Flash->success(__d('user', 'User information successfully updated!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('user', 'User information could not be saved, please check your information.'));
            }
        }

        $this->title(__d('user', 'Editing User'));
        $this->set(compact('user', 'roles', 'languages'));
        $this->Breadcrumb->push('/admin/user/manage');
    }
629764
public function edit($id)
    {
        $this->loadModel('Taxonomy.Vocabularies');
        $vocabulary = $this->Vocabularies->get($id);

        if ($this->request->data()) {
            $vocabulary = $this->Vocabularies->patchEntity($vocabulary, $this->request->data, [
                'fieldList' => [
                    'name',
                    'description',
                ],
            ]);

            if ($this->Vocabularies->save($vocabulary, ['atomic' => true])) {
                $this->Flash->success(__d('taxonomy', 'Vocabulary has been saved!'));
                $this->redirect($this->referer());
            } else {
                $this->Flash->danger(__d('taxonomy', 'Vocabulary could not be saved, please check your information'));
            }
        }

        $this->title(__d('taxonomy', 'Editing Vocabulary'));
        $this->set('vocabulary', $vocabulary);
        $this->Breadcrumb
            ->push('/admin/system/structure')
            ->push(__d('taxonomy', 'Taxonomy'), '/admin/taxonomy/manage')
            ->push(__d('taxonomy', 'Vocabularies'), ['plugin' => 'Taxonomy', 'controller' => 'vocabularies', 'action' => 'index'])
            ->push(__d('taxonomy', 'Editing vocabulary'), '#');
    }
1084851
public function edit($id)
    {
        $model = $this->model->findOrFail($id);
        $categories = new Category;
        $tags = new Tag;
        return view('LaravelAdminBlog::.edit')
            ->with('categories', $categories->forSelect())
            ->with('tags', $tags->forSelect())
            ->with('article', $model)
            ->with('activeMenu', 'sidebar.Blog.List');
    }
393460
public function edit($id)
    {
        return Admin::content(function (Content $content) use ($id) {
            $content->header(trans('admin.administrator'));
            $content->description(trans('admin.edit'));
            $content->body($this->form()->edit($id));
        });
    }
305843
public function edit($id)
    {
        $role = $this->roles->findOrFail($id);
        return \View::make('admin.roles.edit', [
            'role'              =>  $role,
            'title'              => 'edit',
         ]);
    }
559037
public function edit($id)
    {
        $data['data'] = $this->config->getModel()::findOrFail($id);
        $data['app'] = $this->config->tabbable($data['data']);

        $validator = JsValidator::make($this->config->getValid($id));
        View::share('validator', $validator);

        return view('larrock::admin.admin-builder.edit', $data);
    }
57739
public function edit($id)
    {
        $feature = $this->service->find($id);
        return view('admin.features.edit')->with('feature', $feature);
    }