有没有办法在单独的表上将Laravel项目中的Pusher聊天与多个用户类型集成在一起?

时间:2019-06-28 08:31:02

标签: laravel pusher pusher-js

我正在开发一个具有两种用户类型的项目:(vendors_table)中的“ vendors”和“ customers”(customers_table)。我的目标是将两种用户类型与私人一对一聊天联系起来。

我已经尝试过在Pusher上观看多个视频和文档,但是我发现的文档仅适用于一个用户的表。 (默认make:auth

客户表

Schema::create('customers', function (Blueprint $table) {
    $table->bigIncrements('id');
    $table->string('user_type', 15)->default('customer');
    $table->string('customer_first_name', 30);
    $table->string('customer_last_name', 30);
    $table->string('email')->unique();
    $table->timestamp('email_verified_at')->nullable();
    $table->string('password');
    $table->rememberToken();
    $table->timestamps();
});

供应商表

Schema::create('vendors', function (Blueprint $table) {
    $table->bigIncrements('id');
    $table->string('user_type', 15)->default('vendor');
    $table->string('vendor_first_name', 30);
    $table->string('vendor_last_name', 30);
    $table->string('email')->unique();
    $table->string('password');
    $table->string('vendor_type', 25);
    $table->timestamp('approved_at')->nullable();
    $table->timestamp('blacklisted_at')->nullable();
    $table->rememberToken();
    $table->timestamps();
});

我的目标是将两个表连接到私人一对一聊天中。

0 个答案:

没有答案