A Laravel package that scaffolds API authentication for both token & session based authentication using laravel/sanctum
. It uses verification codes for email verification and temporary passwords for forgot password instead of redirecting users to frontend.
Requires PHP ^8.3
You can install the package via composer:
composer require codelabmw/suave --dev
After package installation, run the following artisan command to scaffold API.
php artisan suave:install
This will install Sanctum and copy necessary files for api routing. You are allowed to edit any of these files to customize the behavior suitable for your application however the default state is adequate for most applications. Copied files includes:
- Routes
- Contracts
- Controllers
- Middlewares
- Models
- Notifications
- Events
- Listeners
- Traits
- Tests
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.