Argument 1 passed to App\Http\Controllers\Auth\RegisterController::validator() must be an instance of Illuminate\Http\Request : Can anyone help me with this error? I am making an application, I am using the Laravel Framework version 5.8.35.

ERROR :

    Argument 1 passed to App\Http\Controllers\Auth\RegisterController::validator() must be an instance of Illuminate\Http\Request

Register Controller :

The idea of ​​control is to control the sending of data between the view and the database. This controller controls the application's remit.

    <?php
    
    namespace App\Http\Controllers\Auth;
    
    use App\User;
    use App\Http\Controllers\Controller;
    use Illuminate\Foundation\Auth\RegistersUsers;
    use Illuminate\Http\Request;
    
    class RegisterController extends Controller
    {
           
        use RegistersUsers;
    
        
        protected $redirectTo = '/home';
    
     
        public function __construct()
        {
            $this->middleware('guest');
        }
    
        
        protected function validator(Request $request)
        {
            $this ->validate($request, [
            'nome' => 'required|max:255',
            'sobrenome' => 'required|max:255',
            'email' => 'required|email|unique:users,email|max:255',
            'cpf' => 'required|min:11|unique:users,cpf',
            'rg' => 'required|min:7|unique:users,rg',
            'telefone' => 'required',
            'celular' => 'required',
            'rua' => 'required|max:255',
            'bairro' => 'required|max:255',
            'complemento' => 'max:255',
            'numero' => 'required',
            'cep' => 'required|min:8',
            'datanascimento' => 'required|date|before:today',
            'password' => 'required|min:8|confirmed|max:60',
            ]);
    
    
            $user = User::create(request(['nome','sobrenome', 'email','cpf','rg','telefone','celular','rua','bairro','complento','numero','cep','datanascimento','password']));
            
            auth()->login($user);
         
            return redirect()->to('/home');
    
           
        }
        
    }

View Register: 


The idea of ​​the view is to show the user in a friendlier way how to register to use the system.

        @section('content')
    
    <link href="{{ asset('css/sb-admin-2.min.css')}}" rel="stylesheet">
    
      
                <div class="form-horizontal">
                    {{Form::model(['route' => 'register', 'method' => 'post'])}}
    
                    <div class="form-group">
                        {{Form::label('nome', 'Nome:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('nome',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('nome'))
                            {{$errors->first('nome')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('sobrenome', 'Sobrenome:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('sobrenome',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('nome'))
                            {{$errors->first('nome')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('datanascimento', 'Data de Nascimento:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::date('datanascimento',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('datanascimento'))
                            {{$errors->first('datanascimento')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('cpf', 'CPF:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('cpf',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('cpf'))
                            {{$errors->first('cpf')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('rg', 'RG:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('rg',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('rg'))
                            {{$errors->first('rg')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('telefone', 'Telefone:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('telefone',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('telefone'))
                            {{$errors->first('telefone')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('celular', 'Celular:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('celular',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('celular'))
                            {{$errors->first('celular')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('rua', 'Rua:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('rua',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('rua'))
                            {{$errors->first('rua')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('bairro', 'Bairro:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('bairro',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('bairro'))
                            {{$errors->first('bairro')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('complemento', 'Complemento:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('complemento',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('complemento'))
                            {{$errors->first('complemento')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('numero', 'Número:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('numero',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('numero'))
                            {{$errors->first('numero')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('cep', 'CEP:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('cep',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('cep'))
                            {{$errors->first('cep')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::label('email', 'Email:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::text('email',null,['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('email'))
                            {{$errors->first('email')}}
                        @endif
                    </div>
                    
                    <div class="form-group">
                        {{Form::label('password', 'Senha:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::password('password',['class' => 'col-lg-8 form', 'type' => 'password'])}}
                        @if ($errors->has('password'))
                            {{$errors->first('password')}}
                        @endif
                    </div>
                    <div class="form-group">
                        {{Form::label('password_confirmation', 'Confirmação Senha:',['class' => 'col-lg-2 control-label'])}}
                        {{Form::password('password_confirmation',['class' => 'col-lg-8 form'])}}
                        @if ($errors->has('password_confirmation'))
                            {{$errors->first('password_confirmation')}}
                        @endif
                    </div>
    
                    <div class="form-group">
                        {{Form::reset('Limpar', array('class' => 'btn btn-danger limpar'))}}
                        {{Form::submit('Salvar',array('class'=> 'btn btn-success salvar', 'id' => 'validar'))}}
                        {{Form::close()}}
                    </div>
                </div>
            </div>
        </div>
    </div>
    @endsection

