Пример #1
0
 /**
  * Handle the event.
  *
  * @param Container $container
  */
 public function handle(Container $container)
 {
     $validator = $this->builder->getValidator();
     /*
      * If it's self handling just add @handle
      */
     if ($validator && !str_contains($validator, '@')) {
         $validator .= '@handle';
     }
     /*
      * If the validator is a string or Closure then it's a handler
      * and we and can resolve it through the service container.
      */
     if (is_string($validator) || $validator instanceof \Closure) {
         $container->call($validator, ['builder' => $this->builder]);
     }
 }