<?phpnamespaceModules\Menu\Http\Requests;useIlluminate\Foundation\Http\FormRequest;classCreateMenuRequestextendsFormRequest{publicfunctionrules(){return['name'=>'required','primary'=>'unique:menu__menus',];}publicfunctionauthorize(){returntrue;}publicfunctionmessages(){return['name.required'=>trans('menu::validation.name is required'),'primary.unique'=>trans('menu::validation.only one primary menu'),];}}