eduzz / accounts-laravel-adapter
Eduzz Account 与 Laravel Jetstream 集成包。
v1.35
2023-03-09 16:58 UTC
Requires
- php: ^8.1
- doctrine/dbal: ^3.6.0
- illuminate/contracts: ^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^1.0
- pestphp/pest-plugin-laravel: ^1.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- spatie/laravel-ray: ^1.26
- dev-main
- v1.35
- v1.34
- v1.33
- v1.32
- v1.31
- v1.30
- v1.29
- v1.28
- v1.27
- v1.26
- v1.25
- v1.24
- v1.23
- v1.22
- v1.21
- v1.20
- v1.19
- v1.18
- v1.17
- v1.16
- v1.15
- v1.14
- v1.13
- v1.12
- v1.11
- v1.10
- v1.9
- v1.8
- v1.7
- v1.6
- v1.5
- v1.4
- v1.3
- v1.2
- v1.1
- v1.0
- dev-dependabot/github_actions/dependabot/fetch-metadata-1.6.0
- dev-dependabot/github_actions/aglipanci/laravel-pint-action-2.3.0
This package is auto-updated.
Last update: 2024-09-03 08:24:31 UTC
README
用于在 Laravel 应用中利用 Jetstream 使用 Eduzz Account 的模块。
安装
使用 composer 安装包
composer require eduzz/accounts-laravel-adapter
您需要使用以下命令发布配置:
php artisan vendor:publish --tag="adapter-config"
您需要使用以下命令发布和执行迁移:
php artisan vendor:publish --tag="adapter-migrations"
php artisan migrate
这是已发布配置文件的内容
return [ /** * Enable/disable the Eduzz Account button. */ 'enabled' => env('EDUZZ_ACCOUNTS_ENABLED', true), /** * Url to get back the results of the login attempt. */ 'callbackUrl' => env('EDUZZ_ACCOUNTS_CALLBACK_URL', '/eduzz/callback/'), /** * Eduzz credentials of this app. */ 'id' => env('EDUZZ_ACCOUNTS_ID'), 'secret' => env('EDUZZ_ACCOUNTS_SECRET'), /** * Url to redirect the user after the login. */ 'redirect_to' => '/login', /** * The column name to store the Eduzz Account ID. */ 'tableColumn' => 'eduzz_account_id', /** * Define if the app use Teams. */ 'hasTeams' => true, /** * The app logo to show in the login page. */ 'logo' => '', /** * The background image to show in the login page. */ 'backgroundImage' => '', /** * Define the button color. */ 'buttonColor' => '#000', /** * Set the Eduzz Account Controller class. */ 'routeController' => \Eduzz\AccountsLaravelAdapter\AccountsLaravelAdapterController::class, /** * The Eduzz Account url API. */ 'productionApiUrl' => env('EDUZZ_ACCOUNT_API_URL'), 'testingApiUrl' => env('EDUZZ_ACCOUNT_TESTING_API_URL'), ];
同时,也请导入 app.css 中的按钮样式
@import "/vendor/eduzz/accounts-laravel-adapter/resources/dist/button.css";
可选地,您可以使用以下命令发布视图:
php artisan vendor:publish --tag="adapter-views"
使用方法
在您的 blade 视图中,使用以下方式:
<x-eduzz-account-login-button>Login com Eduzz Account</x-eduzz-account-login-button>
测试
composer test
许可证
MIT 许可证 (MIT)。