I made a register form in the front_page and I want to redirect the user after a successfull registration to /home page, but instead I get an array and the user is not redirected.
{"email":"example@example.com","paypal_email":"example@example.com","updated_at":"2020-02-
14
08:16:32","created_at":"2020-02-14 08:16:32","id":1}
My route:
Route::post('/', 'Auth\RegisterController@create')->name('auth.register');
Register controller:
public function create(Request $request)
{
return User::create([
'email' => $request['email'],
'paypal_email' => $request['paypal_email'],
'password' => Hash::make($request['password']),
]);
}
public $redirectTo = '/home';
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37qvaaz
via IFTTT
Aucun commentaire:
Enregistrer un commentaire