How to add dynamic dropdown list column on Laravel 5.3 registration?

后端 未结 2 1288
野的像风
野的像风 2020-11-29 13:13

I want to create a dropdown list where the data retrieved from the database, ie dropdown level. the value of the dropdown level is taken from the table level.

My re

相关标签:
2条回答
  • 2020-11-29 13:15

    You should not write any code in vendor's file, rather than you may use service injection or view composers to serve your purpose.

    0 讨论(0)
  • 2020-11-29 13:28

    If I understood you correctly, you need to override showRegistrationForm() method. So, copy-paste this method from vendor to RegisterController and work with it there:

    public function showRegistrationForm()
    {
        // Do something here.
    
        return view('auth.register');
    }
    

    Also, do not make any changes in vendor directory.

    0 讨论(0)
提交回复
热议问题