public function execute($command)
 {
     $validator = $this->commandTranslator->toValidator($command);
     if (class_exists($validator)) {
         $this->app->make($validator)->validate($command);
     }
     //return $this->commandBus->execute($command);
     return parent::execute($command);
 }
Example #2
0
 public function execute($command)
 {
     // perform validation
     $validator = $this->commandTranslator->toValidator($command);
     var_dump($validator);
     if (class_exists($validator)) {
         $v = new $validator();
         $v->validate($command);
     }
     return parent::execute($command);
 }