@fhsdmh @vincent15000
if you want to redirect somewhere after an update you can try what i have tried:
if you write "php artisan route:list" in a terminal, you will see that the route "user-profile-information.update" (the one you called in your POST form) redirects on the method "update" in ProfileInformationController (vendor/laravel/fortify/src/Http/Controllers/ProfileInformationController.php).
By defalut, it returns the same page with the updtated informations.
You just have to write "return redirect('/home');" or wherever you want to go
<?php
namespace Laravel\Fortify\Http\Controllers;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
use Laravel\Fortify\Fortify;
<?php
namespace Laravel\Fortify\Http\Controllers;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Laravel\Fortify\Contracts\UpdatesUserProfileInformation;
use Laravel\Fortify\Fortify;
class ProfileInformationController extends Controller
{
/**
* Update the user's profile information.
*
* @param \Illuminate\Http\Request $request
* @param \Laravel\Fortify\Contracts\UpdatesUserProfileInformation $updater
* @return \Illuminate\Http\Response
*/
public function update(Request $request,
UpdatesUserProfileInformation $updater)
{
$updater->update($request->user(), $request->all());
// return $request->wantsJson()
// ? new JsonResponse('', 200)
// : back()->with('status', Fortify::PROFILE_INFORMATION_UPDATED);
return redirect('/home');
}
}
I hope it helps