I have an error when relating by foreign key, it generates the table but not the relation. I deleted the tables and I generated them again and nothing Use php artisan migrate
public function up()
{
Schema::create('students', function (Blueprint $table) {
$table->increments('id');
$table->string('rude');
$table->integer('peoples_id')->unsigned();
$table->foreign('peoples_id')
->references('id')->on('peoples')
->onDelete('cascade');
$table->timestamps();
});
}
public function up()
{
Schema::create('peoples', function (Blueprint $table) {
$table->increments('id');
$table->string('name', 150);
$table->string('firstname', 75);
$table->string('lastname', 75);
$table->timestamps();
});
}