app/Http/Requests/ValidacionMenu.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'nombre' => 'required | max:50 | unique:menu,nombre,'.$this->route('id'),
            'url' => ['required', 'max:100', new ValidarCampoUrl],
            'icono' => 'nullable | max:50'
        ];
    }
public function rules ( ) { return [ 'nombre' => 'required | max:50 | unique:menu,nombre,' . $ this -> route ( 'id' ) , 'url' => [ 'required' , 'max:100' , new ValidarCampoUrl ] , 'icono' => 'nullable | max:50' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .