1. Go to this page and download the library: Download leo76/laravel-react-auth library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
// URL prefix for all routes → /auth/login, /auth/register ...
'route_prefix' => env('REACT_AUTH_PREFIX', 'auth'),
// Eloquent model used for authentication
'user_model' => \App\Models\User::class,
// Set to false to disable the /register page and endpoint
'allow_registration' => env('REACT_AUTH_REGISTRATION', true),
// Middleware applied to all package routes
'middleware' => ['web'],
];