hasMany('Book', 'author_id'); } public function role(): HasOne { return $this->hasOne('Role'); } public function mysqlBooks(): HasMany { return $this->hasMany(MysqlBook::class); } /** * Check if we need to run the schema. */ public static function executeSchema(): void { /** @var \Illuminate\Database\Schema\MySqlBuilder $schema */ $schema = Schema::connection('mysql'); if (! $schema->hasTable('users')) { Schema::connection('mysql')->create('users', function (Blueprint $table) { $table->increments('id'); $table->string('name'); $table->timestamps(); }); } } }