wsmallnews/support

Wsmallnews system support modules

Fund package maintenance!
Wsmallnews

Installs: 3

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

pkg:composer/wsmallnews/support


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

后续文档一些记录

  • media-library 需要更改 observer 为 Wsmallnews\Support\Tenant\MediaLibrary\Observers\MediaObserver,否则删除 media 时,会删除文件系统中的文件,导致其他租户的文件也被删除。

  • laravel-settings

    • boot 方法中注册事件监听器,可以在数据库中初始化 settings 配置
    • 多租户时,settings.php 中添加 team_database 配置项,指定 team_settings 表
      'team_database' => [
          'type' => Wsmallnews\Support\Tenant\Settings\Repositories\DatabaseSettingsRepository::class,
          'model' => null,
          'table' => 'sn_team_settings',
          'connection' => null,
      ],
      

tags 标签表增加三个字段, 支持多租户 team_id scope_type scope_id

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require wsmallnews/support

You can publish the config file with:

php artisan vendor:publish --tag="support-config"

Optionally, you can publish the views using

php artisan vendor:publish --tag="support-views"

This is the contents of the published config file:

return [
];

Usage

$support = new Wsmallnews\Support();
echo $support->echoPhrase('Hello, Wsmallnews!');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.