Modified API and created its tests

This commit is contained in:
Gregorio Chiko Putra
2019-05-09 15:44:27 +07:00
parent b0553839d0
commit a82b6f0af5
7 changed files with 154 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ class CreateSiswasTable extends Migration
$table->string('nisn');
$table->string('kelas');
$table->string('tempat_lahir');
$table->string('tanggal_lahir');
$table->date('tanggal_lahir');
$table->boolean('lulus');
$table->timestamps();
$table->softDeletes();

View File

@@ -15,11 +15,12 @@ class CreateAccessLogsTable extends Migration
{
Schema::create('access_logs', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('siswa_id');
$table->unsignedBigInteger('siswa_id');
$table->timestamps();
$table->softDeletes();
$table->foreign('siswa_id')
->references('id')
->on('siswas')
->onUpdate('cascade')
->onDelete('restrict');