composer create-project laravel/laravel example-app
composer global require laravel/installer #安装laravel laravel new example-app
cd example-app
修改数据库信息等
composer require laravel/ui
php artisan ui bootstrap --auth
npm install npm run dev
composer require laravel/sanctum
vendor:publish
Artisan 命令发布 Sanctum 的配置和迁移文件php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
php artisan migrate
php artisan serve