/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $roleModel = new Role();
     $navigationModel = new Navigation();
     $permissionModel = new Permission();
     if (!($roleRow = $roleModel->getForEdit($id))) {
         return view('admin.common.alert', ['type' => 'warning', 'error' => [trans('page_404')], 'location' => ['url' => route('admin.rbac.roles.index'), 'name' => trans('rbac.role') . trans('common.list')]]);
     }
     return view('admin.rbac.roles.create')->with('navigationRows', $navigationModel->getAllNavigationForChildren())->with('permissionRows', $permissionModel->getAllPermissionForChildren())->with('roleRow', $roleRow);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Permission $permissionModel)
 {
     return view('admin.rbac.permission.index')->with('permissionRows', $permissionModel->getAllPermissionForChildren());
 }