I was following the laravel 5.6 documentation and according to them changing $redirectTo variable inside Register Controllers should redirect user to desired location but I always get redirected to '/home'.
RegisterController
protected $redirectTo = '/home';
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'username' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
web.php
Route::get('/', function () {
return view('welcome');
});
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire