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);
    }
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);
    }
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 ) ; }
Validate menu fields.

@param array $menu

@throws \Exception

@return bool
Validate menu fields .