humweb / thingamabob
这是我包 thingamabob
0.3
2023-07-03 08:43 UTC
Requires
- php: ^8.1
- illuminate/contracts: ^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- nunomaduro/collision: ^6.0
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-09 10:54:14 UTC
README
安装
您可以通过 composer 安装此包
composer require humweb/thingamabob
您可以使用以下命令发布和运行迁移
php artisan vendor:publish --tag="thingamabob-migrations"
php artisan migrate
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="thingamabob-config"
这是已发布配置文件的内容
return [ 'route' => '/api/widgets', 'middleware' => [], 'assets_path' => resource_path('js/widgets/'), ];
用法
注册新小部件
Widgets::resgister('stats', new StatsWiget());
编写小部件
class UserWidget extends AbstractWidget implements Widget { public string $title = 'Users'; public string $component = 'UserWidget'; public function data(Request $request): Collection { return User::take(5)->get(); } }
测试
composer test
变更日志
有关最近更改的更多信息,请参阅 变更日志。
贡献
有关详细信息,请参阅 贡献指南。
安全漏洞
有关如何报告安全漏洞的详细信息,请参阅 我们的安全策略。
鸣谢
许可证
MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件。