Simplified helper routes registration. [skip-ci]

This commit is contained in:
Italo
2022-06-14 05:31:05 -04:00
parent a0258a258f
commit 59e683db58

View File

@@ -121,26 +121,13 @@ php artisan vendor:publish --provider="Laragear\WebAuthn\WebAuthnServiceProvider
php artisan vendor:publish --provider="Laragear\WebAuthn\WebAuthnServiceProvider" --tag="controllers"
```
The `webauthn.php` route file should be added to your `routes` directory. You can pick them up easily in your `RouteServiceProvider`.
The `webauthn.php` route file should be added to your `routes` directory. You can pick them up easily in your `RouteServiceProvider`, or go the quick way and require the file from your `web.php` routes file.
```php
public function boot()
{
$this->configureRateLimiting();
$this->routes(function () {
Route::middleware('api')
->prefix('api')
->group(base_path('routes/api.php'));
Route::middleware('web')
->group(base_path('routes/web.php'));
use Illuminate\Support\Facades\Route;
// WebAuthn Routes
Route::middleware('web')
->group(base_path('routes/webauthn.php'));
});
}
Route::group([], base_path('routes/webauthn.php'));
```
Along with the routes, the authentication controllers will be located at `App\Http\Controllers\WebAuthn`, which these routes point them toward automatically.