1
0
mirror of https://github.com/robonen/education-project.git synced 2026-03-20 02:44:31 +00:00

Получение предметов и учеников класса, классов учителя

This commit is contained in:
nikden13
2020-12-09 00:03:57 +07:00
parent 5b0ba96adf
commit 3c93886fef
10 changed files with 51 additions and 9 deletions

View File

@@ -15,7 +15,7 @@ class CreateTeachersTable extends Migration
{
Schema::create('teachers', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('user_id')->unique();
$table->string('photo')->nullable();
$table->string('name')->nullable();
$table->string('surname')->nullable();

View File

@@ -15,7 +15,7 @@ class CreateParentsTable extends Migration
{
Schema::create('parents', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('user_id')->unique();
$table->string('photo')->nullable();
$table->string('name')->nullable();
$table->string('surname')->nullable();

View File

@@ -15,7 +15,7 @@ class CreateStudentsTable extends Migration
{
Schema::create('students', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('user_id')->unique();
$table->string('photo')->nullable();
$table->string('name')->nullable();
$table->string('surname')->nullable();

View File

@@ -15,7 +15,7 @@ class CreateHeadTeachersTable extends Migration
{
Schema::create('head_teachers', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('user_id')->unique();
$table->string('photo')->nullable();
$table->string('name')->nullable();
$table->string('surname')->nullable();