added booking seeder

updated booking controller
added test for booking
This commit is contained in:
Mohd Arief
2018-05-19 12:33:48 +08:00
parent 18d2ba4543
commit 315ed64520
10 changed files with 140 additions and 70 deletions
@@ -0,0 +1,31 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddBiaInBookingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('bookings', function (Blueprint $table) {
$table->double('bia');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}
+3 -3
View File
@@ -14,8 +14,8 @@ class BookTableSeeder extends Seeder
{
DB::table('bookings')->insert([
// 'id' => '1',
'account_name' => 'kazim',
'account_num' => '1234',
'account_name' => 'milah',
'account_num' => '99898',
'bank_name' => 'maybank',
'bank_branch' => 'rembau',
'company_name' => 'ICEF',
@@ -26,7 +26,7 @@ class BookTableSeeder extends Seeder
'term' => 'x1',
'amount' => 1.2,
'rate_id' => '1',
'user_id' => '17',
'user_id' => '3',
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
]);