In Laravel 5.1 I need to pass some data to the register view.
The getRegister()
function in RegistersUsers trait is responsible to return the view.
At first I modified the function to pass my data but then I realized that the modifications would be overridden in case of an update.
So I made a new controller registerController
and modified the route for getRegister
like this: Route::get('auth/register', 'Auth\RegisterController@getRegister')
Inside the controller I redefined the getRegister function to return the view with my additional data. Now I am thinking.. am I doing this correctly or do I need to use some other method and use the original AuthController some other way?
Also, default auth is set to use email for post login, how do I change it to use username without touching the foundation files?
Are all these matters regarding "extending the framework" ?
Thanks