diff --git a/app/Http/Controllers/ChinaBankSlipController.php b/app/Http/Controllers/ChinaBankSlipController.php index 0ed406ed..e4cc5742 100644 --- a/app/Http/Controllers/ChinaBankSlipController.php +++ b/app/Http/Controllers/ChinaBankSlipController.php @@ -5,7 +5,6 @@ namespace App\Http\Controllers; use App\ChinaBankSlip; use App\Booking; use App\User; -use App\Notification; use Illuminate\Http\Request; use Illuminate\Support\Facades\Storage; use Validator; @@ -82,13 +81,6 @@ class ChinaBankSlipController extends Controller $booking->admin_status = 6; $booking->save(); - $userNotification = new Notification; - $userNotification->detail = "Your china bankslip for booking " . $booking->id . " is uploaded."; - $userNotification->link = "/booking/" . $booking->id . "/upload-po"; - $userNotification->user_id = $booking->user_id; - $userNotification->save(); - - return response()->json(["message"=> "Success"],200); } diff --git a/database/migrations/2018_08_16_101635_drop_notifications_table.php b/database/migrations/2018_08_16_101635_drop_notifications_table.php new file mode 100644 index 00000000..d0b458c2 --- /dev/null +++ b/database/migrations/2018_08_16_101635_drop_notifications_table.php @@ -0,0 +1,28 @@ +uuid('id')->primary(); + $table->string('type'); + $table->morphs('notifiable'); + $table->text('data'); + $table->timestamp('read_at')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('notifications'); + } +} diff --git a/database/seeds/NotificationSeeder.php b/database/seeds/NotificationSeeder.php deleted file mode 100644 index 316b11ad..00000000 --- a/database/seeds/NotificationSeeder.php +++ /dev/null @@ -1,35 +0,0 @@ -first(); - $admin = User::where("email", "admin@example.com")->first(); - - DB::table('notifications')->insert([ - 'detail' => 'This is an user seeder notification', - 'user_id' => $user->id, - 'link' => '/', - 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), - 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'), - ]); - - DB::table('notifications')->insert([ - 'detail' => 'This is an admin seeder notification', - 'user_id' => $admin->id, - '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/components/Navbar.vue b/resources/assets/js/components/Navbar.vue index 7f32c3c2..e7d999fe 100644 --- a/resources/assets/js/components/Navbar.vue +++ b/resources/assets/js/components/Navbar.vue @@ -6,7 +6,7 @@