Created command for importing data from excel

This commit is contained in:
Gregorio Chiko Putra
2019-05-14 14:58:06 +07:00
parent a1f7147bd1
commit 9b91fe40ce
11 changed files with 757 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateHasilBelajarsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('hasil_belajars', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('siswa_id');
$table->longText('meta');
$table->timestamps();
$table->softDeletes();
$table->foreign('siswa_id')
->references('id')
->on('siswas')
->onUpdate('cascade')
->onDelete('restrict');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('hasil_belajars');
}
}