I would like a suggestion on how to implement relationship between tables in laravel using migration.
public function up()
{
Schema::create('professors', function (Blueprint $table) {
$table->increments('id');
$table->string('id_professor');
$table->string('nome');
$table->string('data_nascimento');
$table->timestamps();
});
}
public function up()
{
Schema::create('courses', function (Blueprint $table) {
$table->increments('id');
$table->string('id_curso');
$table->string('nome');
$table->string('id_professor');
$table->timestamps();
});
}
public function up()
{
Schema::create('students', function (Blueprint $table) {
$table->increments('id');
$table->string('id_aluno');
$table->string('nome');
$table->string('data_nascimento');
$table->string('logradouro');
$table->string('numero');
$table->string('bairro');
$table->string('cidade');
$table->string('estado');
$table->string('cep');
$table->string('id_curso');
$table->timestamps();
});
}