original_string: public function validateMenu(array $menu)
      {
          /** @var \Illuminate\Validation\Validator $validator */
          $validator = Validator::make($menu, $this->menuValidationRules);
  
          if ($validator->passes()) {
              return true;
          }
  
          $message = "Invalid menu:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages()));
  
          throw new \Exception($message);
      }
code: public function validateMenu(array $menu)
      {
          /** @var \Illuminate\Validation\Validator $validator */
          $validator = Validator::make($menu, $this->menuValidationRules);
  
          if ($validator->passes()) {
              return true;
          }
  
          $message = "Invalid menu:\r\n".implode("\r\n", Arr::flatten($validator->errors()->messages()));
  
          throw new \Exception($message);
      }
code_tokens: public function validateMenu ( array $ menu ) { /** @var \Illuminate\Validation\Validator $validator */ $ validator = Validator :: make ( $ menu , $ this -> menuValidationRules ) ; if ( $ validator -> passes ( ) ) { return true ; } $ message = "Invalid menu:\r\n" . implode ( "\r\n" , Arr :: flatten ( $ validator -> errors ( ) -> messages ( ) ) ) ; throw new \ Exception ( $ message ) ; }
docstring: Validate menu fields.
  
  @param array $menu
  
  @throws \Exception
  
  @return bool
docstring_tokens: Validate menu fields .