/**
  * Store permission
  *
  * @param array $permissionData            
  * @throws NotFoundException, ValidationException
  * @return \App\Models\PermissionModel
  */
 public function store($permissionData)
 {
     try {
         if (array_get($permissionData, 'id')) {
             $permission = PermissionModel::findOrFail((int) array_get($permissionData, 'id'))->fill($permissionData);
         } else {
             $permission = new PermissionModel();
             $permission->fill($permissionData);
         }
     } catch (Exception $e) {
         throw new NotFoundException(trans('app.notFound'));
     }
     if (!$permission->validate()) {
         throw new ValidationException(trans('app.correctErrors'), $permission->errors()->toArray());
     }
     try {
         $permission->save();
     } catch (Exception $e) {
         throw $e;
     }
     return $permission;
 }