Skip to content

Commit

Permalink
Added database notifications to filament (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjustesen authored Oct 24, 2022
1 parent 04e5cee commit 1fa6b60
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/filament.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@
*/

'database_notifications' => [
'enabled' => false,
'polling_interval' => '30s',
'enabled' => true,
'polling_interval' => '10s',
],

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->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');
}
};

0 comments on commit 1fa6b60

Please sign in to comment.