public function update(Update $request, $id)
    {
        try {
            $permission = $this->repository->findById($id);

            $data = $request->all();

            $permission->update($data);

            return $this->redirect('permissions.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
public function update(Update $request, $id)
    {
        try {
            $permission = $this->repository->findById($id);

            $data = $request->all();

            $permission->update($data);

            return $this->redirect('permissions.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
public function update ( Update $ request , $ id ) { try { $ permission = $ this -> repository -> findById ( $ id ) ; $ data = $ request -> all ( ) ; $ permission -> update ( $ data ) ; return $ this -> redirect ( 'permissions.index' ) ; } catch ( ModelNotFoundException $ e ) { return $ this -> redirectNotFound ( ) ; } }
Update the specified permission in storage.

@param int $id

@return Response
Update the specified permission in storage .