Add Laravel Sanctum for API authentication and update routes
- Included `laravel/sanctum` in `composer.json` for lightweight API authentication. - Updated `User` model to use `HasApiTokens` trait for token management. - Configured API routing in `bootstrap/app.php`. - Modified `DatabaseSeeder` to include `ShieldSeeder` and adjusted `FillJsonData` seeder method. - Changed JSON data path in `ProvincesMigrator` for testing purposes. - Updated web routes to utilize `MigrationController` for better organization.
This commit is contained in:
@@ -10,6 +10,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Facades\Date;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
@@ -28,6 +29,7 @@ class User extends Authenticatable implements FilamentUser, HasAvatar
|
||||
|
||||
use Notifiable;
|
||||
use UserAdjustments;
|
||||
use HasApiTokens;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
|
||||
Reference in New Issue
Block a user