mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
Update UI and migration,seeder for notification.
This commit is contained in:
@@ -16,7 +16,9 @@ class CreateNotificationTable extends Migration
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('detail');
|
||||
$table->string('link');
|
||||
$table->unsignedInteger('user_id');
|
||||
$table->boolean('is_read')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_id')
|
||||
|
||||
@@ -19,6 +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',
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
@@ -26,6 +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',
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user