i have two table, table universitas and table fakultas
on schema table universitas like below
public function up()
{
Schema::create('universitas', function (Blueprint $table) {
$table->string('id');
$table->string('nama_universitas');
$table->timestamps();
});
}
and table fakultas like below
public function up()
{
Schema::create('fakultas', function (Blueprint $table) {
$table->increments('id');
$table->string('nama_fakultas');
$table->string('nama_universitas')->unsigned();
$table->foreign('nama_universitas')->references('id')->on('universitas');
$table->string('keterangan');
$table->timestamps();
});
}
its possible if i use data type string and use unsigned?
when i executed with php artisan migrate, i get an Error