henrotaym/laravel-trustup-messaging-io 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

henrotaym/laravel-trustup-messaging-io

最新稳定版本:v2.0.1

Composer 安装命令:

composer require henrotaym/laravel-trustup-messaging-io

包简介

Basic versioned php package.

README 文档

README

Compatibility

Laravel Package
8.x / 9.x 1.x
12.x 2.x

Installation

composer require henrotaym/laravel-trustup-messaging-io

.env configuration

Add these information to your .env file.

TRUSTUP_MESSAGING_API_URL=
TRUSTUP_MESSAGING_APP_KEY=

Preparing your models morph type (optional).

Define your morph types in an service provider like AppServiceProvider for example.

use App\Models\YourModel;
use Illuminate\Support\ServiceProvider;
use Illuminate\Database\Eloquent\Relations\Relation;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        Relation::enforceMorphMap([
            'your-model' => YourModel::class,
        ]);
    }
}

Preparing your models

Your model should look like this

use Henrotaym\LaravelTrustupMessagingIo\Contracts\Models\MessagingIoModelContract;
use Henrotaym\LaravelTrustupMessagingIo\Models\Traits\IsMessagingIoModel;
use Illuminate\Database\Eloquent\Model;

class MyModel extends Model implements MessagingIoModelContract
{
    use IsMessagingIoModel;
}

Exposing your model

Your resource exposing your model shoud look like this

use Henrotaym\LaravelTrustupMessagingIo\Http\Resources\MessagingIoModel;
use Illuminate\Http\Request;

class MyResource extends MessagingIoModel
{
    protected function getAttributes(Request $request): array
    {
        // Define your attributes here.
    }
}

Your resource will automatically have trustup_io_messaging key containing values required to use Vue messaging package

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固