/**
  * Update the specified resource in storage.
  *
  * @param  int $id
  * @return Response
  */
 public function update($id, UpdateRequest $updateRequest)
 {
     $result = $this->permissionRepository->update($id, $updateRequest->all());
     if (!$result['status']) {
         $alert = ['type' => 'warning', 'data' => [$result['error']]];
     } else {
         $alert = ['type' => 'success', 'data' => ['权限更新成功']];
     }
     return redirect(route('admin.rbac.permission.edit', ['id' => $id]))->with('am-alert', $alert);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  UpdateRequest  $request
  * @param  int  $id
  * @return Response
  */
 public function update(UpdateRequest $request, $id)
 {
     $result = $this->permissionRepository->update($id, $request->all());
     $result['status'] ? $alert = '权限更新成功' : ($alert = $result['error']);
     return redirect()->route('rbac.permission.index')->with('message', $alert);
 }