gammamatrix/site-api-angular
Composer 安装命令:
composer create-project gammamatrix/site-api-angular
包简介
Playground: This is a base application site for Laravel based Playground APIs and Angular UIs.
README 文档
README
Site: Playground API and Angular SPA Integration Package for Laravel v11 and Angular v16, v17, v18 applications.
Read more on using Site: Playground API and Angular SPA Integration at Read the Docs: Playground Documentation.
Angular Application
Site: Playground CMS UI with Angular
Currently, there are two Angular applications available to use with this base Laravel application.
CMS with Angular v16 and Angular Material
See: gammamatrix/site-playground-cms-angular
CMS with Angular v18 and Bootstrap v5
See: gammamatrix/site-playground-cms-angular-bootstrap
Toggle User Information
Users
By default, this application uses a user with a UUID for a primary key: app/Models/PlaygroundUser.php.
- auto-incrementing is also supported with the standard app/Models/User.phps, which has been renamed as a source file.
Toggle Testing and Development Information
Testing and Development
Users
Playground Test provides a custom user table seeder: CustomUsersTableSeeder for development.
- There is also a DatabaseSeeder class that will import
Custom*Seedersused in this application: database/seeders/DatabaseSeeder.php.
The user model is set up in config/auth.php:
'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => env('AUTH_MODEL', App\Models\PlaygroundUser::class), ], ],
Setting up users for testing
For security reasons, the CustomUsersTableSeeder must be manually linked or copied to this application:
cd database/seeders
ln -snf ../../vendor/gammamatrix/playground-test/resources/CustomUsersTableSeeder.php
Toggle Dev Notes
Dev Notes
A base Laravel installation was used.
composer create-project laravel/laravel site-api-angular
Enabled Sanctum
Added Laravel\Sanctum\HasApiTokens to the User model.
php artisan install:api php artisan config:publish cors
SESSION_DOMAIN=site-api-angular
# SESSION_DOMAIN=site-playground-integration
SESSION_HTTP_ONLY=false
SESSION_SECURE_COOKIE=false
SANCTUM_STATEFUL_DOMAINS=site-api-angular
composer require gammamatrix/playground-cms-api
- composer.json need to allow
"minimum-stability": "dev",
nginx configuration for the PHP API and Angular app
resources/configuration/31010-site-api-angular.conf
- Note development is done on http with scheme-less URLs, where possible.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-07-25


