Display the edit permission form

@author Steve Montambeault
@link   http://stevemo.ca

@param $id

@return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
164523
public function edit($id)
    {
        $permission = $this->permissions->find($id);

        if ( $permission )
        {
            return View::make( Config::get('cpanel::views.permissions_edit') )
                ->with('permission', $permission);
        }
        else
        {
            return Redirect::route('cpanel.permissions.index')
                ->with('error', Lang::get('cpanel::permissions.model_not_found'));
        }
    }
741546
public function edit($id)
    {
        // Fetch the role object
        // $id = $this->decode($hash);
        $role = $this->roleRepository->findById($id);

        if ($role) {
            return view('Centaur::roles.edit')
                ->with('role', $role);
        }

        session()->flash('error', 'Invalid role.');
        return redirect()->back();
    }
929467
public function edit($id)
    {
        $user = \App\User::findOrfail($id);
        $roles = Role::all()->pluck('name');
        $permissions = Permission::all()->pluck('name');
        $userRoles = $user->roles;
        $userPermissions = $user->permissions;

        return view('scaffold-interface.users.edit', compact('user', 'roles', 'permissions', 'userRoles', 'userPermissions'));
    }
114780
public function getEdit($id) {
    $term = Term::find($id);

    if (is_null($term)) {
      return Redirect::back($this->route_prefix . 'taxonomy.index');
    }

     return View::make('taxonomy::terms.edit', compact('term'));
  }
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'));
    }
1146660
public function edit($id)
    {
        $roles = Role::getAllLists();
        $navigation = NavigationAdmin::findOrFail($id);

        return $this->view('titan::settings.navigation.add_edit')
            ->with('item', $navigation)
            ->with('roles', $roles)
            ->with('parents', NavigationAdmin::getAllLists());
    }
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');
    }
305843
public function edit($id)
    {
        $role = $this->roles->findOrFail($id);
        return \View::make('admin.roles.edit', [
            'role'              =>  $role,
            'title'              => 'edit',
         ]);
    }
478422
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->table_type_plural;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'        => $this->package_title,
                'table_type_plural'    => $this->table_type_plural,
                'table_type_singular'  => $this->table_type_singular,
                'resource_route_name'  => $this->resource_route_name,
                'HTMLHelper'           => HTMLHelper::class,
            ]);
        }

        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $message = 'This tag is not available for editing, as someone else is currently editing this tag';
            Session::flash('message', $message);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.'.$this->resource_route_name.'.index');
        }

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

        return view('formhandling::lookuptables/' . config('lasallecmsadmin.admin_template_name') . '/create', [
            'package_title'       => $this->package_title,
            'table_type_plural'   => $this->table_type_plural,
            'table_type_singular' => $this->table_type_singular,
            'resource_route_name' => $this->resource_route_name,
            'DatesHelper'         => DatesHelper::class,
            'HTMLHelper'          => HTMLHelper::class,
            'record'              => $this->repository->getFind($id),
        ]);
    }
339360
public function edit($id)
    {
        // Fetch the user object
        // $id = $this->decode($hash);
        $user = $this->userRepository->findById($id);

        // Fetch the available roles
        $roles = app()->make('sentinel.roles')->createModel()->all();

        if ($user) {
            return view('Centaur::users.edit', [
                'user' => $user,
                'roles' => $roles
            ]);
        }

        session()->flash('error', 'Invalid user.');
        return redirect()->back();
    }
417709
public function editAction(Request $request, $id)
    {
        $em = $this->getDoctrine()->getManager();
        $template = $em->getRepository('OpiferContentBundle:Template')->find($id);

        $form = $this->createForm(TemplateType::class, $template);
        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $em->flush();

            return $this->redirectToRoute('opifer_cms_template_edit', ['id' => $template->getId()]);
        }

        return $this->render('OpiferCmsBundle:Backend/Template:edit.html.twig', [
            'form' => $form->createView(),
            'template' => $template,
        ]);
    }
435690
public function editAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $permissionsGroup = $em->getRepository('ChillMainBundle:PermissionsGroup')->find($id);

        if (!$permissionsGroup) {
            throw $this->createNotFoundException('Unable to find PermissionsGroup entity.');
        }

        $editForm = $this->createEditForm($permissionsGroup);
        
        $deleteRoleScopesForm = array();
        foreach ($permissionsGroup->getRoleScopes() as $roleScope) {
            $deleteRoleScopesForm[$roleScope->getId()] = $this->createDeleteRoleScopeForm(
                    $permissionsGroup, $roleScope);
        }
        
        $addRoleScopesForm = $this->createAddRoleScopeForm($permissionsGroup);

        return $this->render('ChillMainBundle:PermissionsGroup:edit.html.twig', array(
            'entity'      => $permissionsGroup,
            'edit_form'   => $editForm->createView(),
            'expanded_roles' => $this->getExpandedRoles($permissionsGroup->getRoleScopes()->toArray()),
            'delete_role_scopes_form' => array_map( function($form) { 
                
                return $form->createView(); 
            }, $deleteRoleScopesForm),
            'add_role_scopes_form' => $addRoleScopesForm->createView()
        ));
    }
95967
public function edit($id) {
		$dep        = Dep::find($id);
		$department = Dep::where('parent', null)->pluck('name_'.app('l'), 'id');
		return view('admin.department.edit', ['title' => trans('admin.edit'),
				'department'                                => $department,
				'edit'                                      => $dep,
			]);
	}
926323
public function edit($id) {
        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $response = 'This user is not available for editing, as someone else is currently editing this user';
            Session::flash('message', $response);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.users.index');
        }


        // My custom helpful HELPER method "adminPageSubTitle()" displays the "title" field of a record.
        // There is no such "title" field in the users table. So, let's pretend, to make my helpful helper method happy!
        $user = $this->repository->getFind($id);
        $user->title = $user->name;

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

        $field = [
            'name'                => 'groups',
            'related_table_name'  => 'groups',
            'related_model_class' => 'Group',
        ];

        return view('lasallecmsadmin::'.config('lasallecmsadmin.admin_template_name').'/users/create',[
            'repository'  => $this->repository,
            'field'       => $field,
            'pagetitle'   => 'Users',
            'DatesHelper' => DatesHelper::class,
            'Form'        => Form::class,
            'HTMLHelper'  => HTMLHelper::class,
            'user'         => $user,
        ]);
    }
539176
public function delete($id)
    {
        try {
            $this->permissionRepositoryInterface->delete($id);
        } catch (PermissionsException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('permissions.index');
        }

        Flash::success(trans('dashboard::dashboard.flash.permission.delete.success'));

        return redirect()->route('permissions.index');
    }
1321061
public function actionView($id)
    {
        $this->layout = static::MAIN_LAYOUT;
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }
908636
public function edit($id = null) {
		$block = $this->Blocks->get($id, [
			'contain' => []
		]);
		if ($this->request->is(['patch', 'post', 'put'])) {
			$block = $this->Blocks->patchEntity($block, $this->request->data);
			if ($this->Blocks->save($block)) {
				$this->Flash->success('The block has been saved.');
				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error('The block could not be saved. Please, try again.');
			}
		}
		$this->set(compact('block'));
	}