Select query problem in Laravel

2

I am creating a form to register users, it works with normal fields, but if I want to add a select the form says that it does not recognize the variable.

  

"Undefined variable: user_types (View:   C: \ laragon \ www \ crudgobernaciontres \ resources \ views \ auth \ register.blade.php)

This is what I have in the controller:

link

And this what I have in sight.

link

I have suspicions with this new method that I added to the controller, but I'm not sure ..

public function lista()
   {
        $tipos_usuarios = \DB::table('tipos_usuarios')->select('id', 'usuarios_rol')->get();
        dd($tipos_usuarios);
        return view('auth.register')->with('tipos_usuarios', $tipos_usuarios);

    }
    
asked by zereft 05.10.2018 в 21:58
source

0 answers