This commit is contained in:
LAPTOP-DGCU80CH\user1
2020-12-24 10:56:32 +08:00
parent c0ae6a04a0
commit 15cf079e2d
26 changed files with 75 additions and 796 deletions
@@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('noic')->unique();
$table->string('alamat');
$table->string('main_phone');
$table->string('alternate_phone')->nullable();
$table->string('alamat_menyurat');
$table->integer('poskod');
$table->string('daerah');
$table->string('negeri');
$table->integer('umur');
$table->string('warganegara');
$table->string('bangsa');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customers');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateGadaianTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gadaian', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('gadaian');
}
}
@@ -1,43 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMarhunTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('marhun', function (Blueprint $table) {
$table->id();
$table->String('no_rujukan');
$table->String('marhun');
$table->String('note');
$table->boolean('rosak');
$table->boolean('putus');
$table->boolean('patah');
$table->boolean('permata');
$table->boolean('sebelah');
$table->String('karat');
$table->String('berat');
$table->float('harga');
$table->float('nilai_marhun');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('marhun');
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePenebusanTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('penebusan', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('penebusan');
}
}
@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddRolesToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->String('roles');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('roles');
});
}
}
@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function (Blueprint $table) {
$table->id();
$table->String('role_name');
$table->String('role_code');
$table->String('description');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('roles');
}
}
@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateHargaEmasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('harga_emas', function (Blueprint $table) {
$table->id();
$table->String('mutu_emas');
$table->String('karat');
$table->float('kaunter');
$table->float('harga_gram');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('harga_emas');
}
}
@@ -1,39 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCawanganTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cawangan', function (Blueprint $table) {
$table->id();
$table->String('nama');
$table->String('code');
$table->String('alamat');
$table->String('poskod');
$table->String('daerah');
$table->String('negeri');
$table->String('no_telefon');
$table->String('no_fax');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cawangan');
}
}
@@ -1,32 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCawanganToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->String('cawangan');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('cawangan');
});
}
}
@@ -1,34 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddInfoUserToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->String('no_kp');
$table->String('no_telefon');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('no_kp');
$table->dropColumn('no_telefon');
});
}
}
@@ -1,31 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBangsaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bangsa', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bangsa');
}
}
@@ -1,33 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBankTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bank', function (Blueprint $table) {
$table->id();
$table->String('bank_name');
$table->String('bank_code');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('bank');
}
}
@@ -1,38 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMediaTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('media', function (Blueprint $table) {
$table->bigIncrements('id');
$table->morphs('model');
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('mime_type')->nullable();
$table->string('disk');
$table->unsignedBigInteger('size');
$table->json('manipulations');
$table->json('custom_properties');
$table->json('responsive_images');
$table->unsignedInteger('order_column')->nullable();
$table->nullableTimestamps();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('media');
}
}
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSessionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->unique();
$table->foreignId('user_id')->nullable();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->text('payload');
$table->integer('last_activity');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sessions');
}
}
-16
View File
@@ -1,16 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class BangsaSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}
-16
View File
@@ -1,16 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class BankSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}
-16
View File
@@ -1,16 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class CawanganSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
}
}
-59
View File
@@ -1,59 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class HargaEmasSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('harga_emas')->insert([
[
'mutu_emas' => '999',
'karat' => '24K',
'kaunter' => 183.68,
'harga_gram' => 262.40
],
[
'mutu_emas' => '950',
'karat' => '23K',
'kaunter' => 174.50,
'harga_gram' => 249.28
],
[
'mutu_emas' => '916',
'karat' => '22K',
'kaunter' => 168.25,
'harga_gram' => 240.36
],
[
'mutu_emas' => '900',
'karat' => '21K',
'kaunter' => 165.31,
'harga_gram' => 236.16
],
[
'mutu_emas' => '835',
'karat' => '20K',
'kaunter' => 153.57,
'harga_gram' => 219.10
],
[
'mutu_emas' => '750',
'karat' => '18K',
'kaunter' => 137.76,
'harga_gram' => 196.80
],
[
'mutu_emas' => '585',
'karat' => '14K',
'kaunter' => 137.76,
'harga_gram' => 153.50
]
]);
}
}
-98
View File
@@ -1,98 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class PoskodSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('poskod')->insert([
[
'poskod'=>'01000',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01007',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01009',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01500',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01502',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01503',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01504',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01505',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01506',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01508',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01512',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01514',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01516',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01517',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01518',
'bandar'=>'Kangar',
'negeri'=>'PLS'
],
[
'poskod'=>'01524',
'bandar'=>'Kangar',
'negeri'=>'PLS'
]
]);
}
}
-37
View File
@@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class RolesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB:table('roles')->insert([
[
'role_name' => 'Penolong Pengurus Cawangan',
'role_code' => 'PPC',
'description' => 'Penolong Pengurus Cawangan',
],
[
'role_name' => 'Khazanah',
'role_code' => 'Khazanah',
'description' => 'Khazanah',
],
[
'role_name' => 'Juruwang',
'role_code' => 'TT',
'description' => 'Juruwang',
],
[
'role_name' => 'Penilai',
'role_code' => 'PP',
'description' => 'Penilai',
]
]);
}
}
-81
View File
@@ -1,81 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class StateSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('state')->insert([
[
'nama_negeri' => 'Kelantan',
'code_negeri' => 'KEL'
],
[
'nama_negeri' => 'Johor',
'code_negeri' => 'JHR'
],
[
'nama_negeri' => 'Kedah',
'code_negeri' => 'KDH'
],
[
'nama_negeri' => 'Kuala Lumpur',
'code_negeri' => 'KUL'
],
[
'nama_negeri' => 'Labuan',
'code_negeri' => 'LBN'
],
[
'nama_negeri' => 'Melaka',
'code_negeri' => 'MLK'
],
[
'nama_negeri' => 'Negeri Sembilan',
'code_negeri' => 'NSN'
],
[
'nama_negeri' => 'Pahang',
'code_negeri' => 'PHG'
],
[
'nama_negeri' => 'Penang',
'code_negeri' => 'PNG'
],
[
'nama_negeri' => 'Perak',
'code_negeri' => 'PRK'
],
[
'nama_negeri' => 'Perlis',
'code_negeri' => 'PLS'
],
[
'nama_negeri' => 'Putrajaya',
'code_negeri' => 'PJY'
],
[
'nama_negeri' => 'Sabah',
'code_negeri' => 'SBH'
],
[
'nama_negeri' => 'Sarawak',
'code_negeri' => 'SRW'
],
[
'nama_negeri' => 'Selangor',
'code_negeri' => 'SGR'
],
[
'nama_negeri' => 'Terengganu',
'code_negeri' => 'TRG'
]
]);
}
}