I'm trying to create foreign keys in Laravel 5.8 and when I migrate my table using Artisan the foreign key not set. In the cities
table and provinces
table, all id fields are unsigned integers. I'm working with wamp64 on Windows 10.
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->integer('city_id')->unsigned();
$table->integer('province_id')->unsigned();
// table Foreign Key
$table->foreign('city_id')->references('id')->on('cities');
$table->foreign('province_id')->references('id')->on('provinces');
});
}