original_string: protected function makeValidator($resource, $class)
      {
          $validator = $this->container->make($class);
  
          if (method_exists($validator, 'setResourceName')) {
              $validator->setResourceName($resource);
          }
          $this->publish($resource, 'validator.created', [$validator]);
          return $validator;
      }
code: protected function makeValidator($resource, $class)
      {
          $validator = $this->container->make($class);
  
          if (method_exists($validator, 'setResourceName')) {
              $validator->setResourceName($resource);
          }
          $this->publish($resource, 'validator.created', [$validator]);
          return $validator;
      }
code_tokens: protected function makeValidator ( $ resource , $ class ) { $ validator = $ this -> container -> make ( $ class ) ; if ( method_exists ( $ validator , 'setResourceName' ) ) { $ validator -> setResourceName ( $ resource ) ; } $ this -> publish ( $ resource , 'validator.created' , [ $ validator ] ) ; return $ validator ; }
docstring: Creates the validator and fires an event
  
  @param string $resource
  @param string $class
  @return \Cmsable\Resource\Contracts\Validator
docstring_tokens: Creates the validator and fires an event