From ae081ddddf1b1ba629cd36be353e66c30486b3ac Mon Sep 17 00:00:00 2001 From: Jack Goh Date: Wed, 8 Aug 2018 10:41:29 +0800 Subject: [PATCH] fix booking internal server error due to db not accepting null value fixed copy right on booking form update notification seeder --- ...103115_make_nullable_in_bookings_table.php | 37 +++++++++++++++++++ database/seeds/NotificationSeeder.php | 4 +- resources/assets/js/pages/home.vue | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 database/migrations/2018_08_08_103115_make_nullable_in_bookings_table.php diff --git a/database/migrations/2018_08_08_103115_make_nullable_in_bookings_table.php b/database/migrations/2018_08_08_103115_make_nullable_in_bookings_table.php new file mode 100644 index 00000000..d8524e66 --- /dev/null +++ b/database/migrations/2018_08_08_103115_make_nullable_in_bookings_table.php @@ -0,0 +1,37 @@ +string('company_name')->nullable()->change(); + $table->string('company_address')->nullable()->change(); + $table->string('bank_address')->nullable()->change(); + $table->string('swift_code')->nullable()->change(); + $table->string('cnap')->nullable()->change(); + $table->string('term')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('bookings', function (Blueprint $table) { + // + }); + } +} diff --git a/database/seeds/NotificationSeeder.php b/database/seeds/NotificationSeeder.php index ac238997..316b11ad 100644 --- a/database/seeds/NotificationSeeder.php +++ b/database/seeds/NotificationSeeder.php @@ -19,7 +19,7 @@ class NotificationSeeder extends Seeder DB::table('notifications')->insert([ 'detail' => 'This is an user seeder notification', 'user_id' => $user->id, - 'link' => 'http://www.google.com', + 'link' => '/', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'), ]); @@ -27,7 +27,7 @@ class NotificationSeeder extends Seeder DB::table('notifications')->insert([ 'detail' => 'This is an admin seeder notification', 'user_id' => $admin->id, - 'link' => 'http://www.google.com', + 'link' => '/', 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'), ]); diff --git a/resources/assets/js/pages/home.vue b/resources/assets/js/pages/home.vue index 748e8fb6..cd6abbc6 100644 --- a/resources/assets/js/pages/home.vue +++ b/resources/assets/js/pages/home.vue @@ -149,7 +149,7 @@ - +