SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '' (SQL: create table `` (id
int unsigned not null auto_increment primary key, name
varchar(191) not null, slug
varchar(191) not null,
description
varchar(191) null, level
int not null default '1', created_at
timestamp null, updated_at
timestamp null, deleted_at
timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
public function up()
{
$connection = config('roles.connection');
$table = config('roles.rolesTable');
$tableCheck = Schema::connection($connection)->hasTable($table);
if (!$tableCheck) {
Schema::connection($connection)->create($table, function (Blueprint $table) {
$table->increments('id')->unsigned();
$table->string('name');
$table->string('slug')->unique();
$table->string('description')->nullable();
$table->integer('level')->default(1);
$table->timestamps();
$table->softDeletes();
});
}
}