承接 enginedigital/model-notes 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

enginedigital/model-notes

Composer 安装命令:

composer require enginedigital/model-notes

包简介

Create notes on eloquent models. Supports multiple note types as well as multi-tenancy

README 文档

README

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

Create notes on eloquent models. Supports multiple note types as well as multi-tenancy.

Installation

You can install the package via composer:

composer require enginedigital/model-notes

You can publish and run the migrations with:

php artisan vendor:publish --provider="EngineDigital\Note\NoteServiceProvider" --tag="model-notes-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --provider="EngineDigital\Note\NoteServiceProvider" --tag="model-notes-config"

This is the contents of the published config file:

return [
    'note_model' => EngineDigital\Note\Note::class,
    'note_default_type' => 'none',
    'note_default_group' => 'admin',
    // key => 'formatter_class_with_invoke',
    // key => ['formatter', 'method'],
    'note_types' => [
        'none' => null, // dont touch formatted output
        'plain' => 'e', // escape in formatted output
        'html' => null, // dont touch formatted output
        'markdown' => [\Illuminate\Support\Str::class, 'markdown'],
        'json' => 'json_decode', // treat the note content as JSON
    ],
    'model_primary_key_attribute' => 'model_id',
    'encrypt_notes' => false,
    'tenant_model' => null, // App\Models\Company::class
    'tenant_resolver' => null, // a class that uses `__invoke` or a container function to get the id of the current tenant
    'author_model' => null, // App\Models\User::class
    'author_resolver' => null, // a class that uses `__invoke` or a container function to get the id of the current user
    'cache_time' => null, // cache time in seconds
    'load_with' => [], // which note relationships to eager load. Example: ['author', 'author.profile', 'author.roles'] or only specific columns ['author:id,name']
];

Usage

// User model uses EngineDigital\Note\HasNotes
$user->setNote('This is my cute little note!');

Testing

composer run test

Contributing

Please see CONTRIBUTING for details.

Credits

License

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

统计信息

  • 总下载量: 1.62k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固