我这样尝试
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name');
$table->string('email',150)->unique();
$table->string('password');
$table->integer('roleid')->unsigned();
$table->rememberToken();
/*Common Fields*/
$table->integer('status');
$table->integer('createdby');
$table->integer('modifiedby');
$table->string('publicguid');
$table->string('privateguid');
$table->timestamps();
/*From other table */
$table->foreign('roleid') ->references('id')->on('userroles')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
但有例外
'无法构造的实例 org.telegram.telegrambots.api.objects.replykeyboard.ApiResponse (尽管至少存在一个创建者):没有布尔/布尔参数 从布尔值(false)反序列化的构造函数/工厂方法。
答案 0 :(得分:0)
通过这种方式,我得到了组成员的人数。
GetChatMemberCount chatMemberCount = new GetChatMemberCount().setChatId(message.getChatId());
try { Integer count = execute(chatMemberCount); } catch (TelegramApiException e) { logger.error(e.getMessage()); }