Skip to content

Commit

Permalink
migration database
Browse files Browse the repository at this point in the history
  • Loading branch information
FirmanWahyudi007 committed May 19, 2022
1 parent 97d4864 commit 3266199
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/Models/Fasilitas.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Fasilitas extends Model
{
use HasFactory;
}
11 changes: 11 additions & 0 deletions app/Models/GambarKamar.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class GambarKamar extends Model
{
use HasFactory;
}
11 changes: 11 additions & 0 deletions app/Models/KamarKost.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class KamarKost extends Model
{
use HasFactory;
}
11 changes: 11 additions & 0 deletions app/Models/LokasiKost.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class LokasiKost extends Model
{
use HasFactory;
}
36 changes: 36 additions & 0 deletions database/migrations/2022_05_17_014123_create_kamar_kosts_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kamar_kosts', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->integer('jumlah');
$table->integer('harga');
$table->text('peraturan');
$table->integer('id_lokasi');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('kamar_kosts');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lokasi_kosts', function (Blueprint $table) {
$table->id();
$table->string('lokasi_tempat');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('lokasi_kosts');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gambar_kamars', function (Blueprint $table) {
$table->id();
$table->integer('id_kamar');
$table->string('path');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('gambar_kamars');
}
};
33 changes: 33 additions & 0 deletions database/migrations/2022_05_19_012734_create_fasilitas_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('fasilitas', function (Blueprint $table) {
$table->id();
$table->integer('id_kamar');
$table->string('fasilitas');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('fasilitas');
}
};

0 comments on commit 3266199

Please sign in to comment.