composer require laravel/fortify
Laravel\Fortify\FortifyServiceProvider
php artisan vendor:publish
php artisan migrate
App\Providers\FortifyServiceProvider::class
App\Providers\FortifyServiceProvider.php
Fortify::loginView(function () {
return view('auth.login');
});
change views true to false
in config\fortify.php
'views' => true,
POST => Accept as application/json
Copy fortify routes to routes/api.php and cusstomize as you want.
vendor\laravel\fortify\routes\routes.php
like this:
Route::post('/register', [RegisteredUserController::class, 'store'])
->middleware(['guest:'.config('fortify.guard')]);
php artisan route:list -c
php artisan route:list --name=register