Added database notifications to filament (#83)

This commit is contained in:
Alex Justesen
2022-10-24 11:22:48 -04:00
committed by GitHub
parent 04e5cee9ec
commit 1fa6b60f72
2 changed files with 37 additions and 2 deletions
+2 -2
View File
@@ -182,8 +182,8 @@ return [
*/
'database_notifications' => [
'enabled' => false,
'polling_interval' => '30s',
'enabled' => true,
'polling_interval' => '10s',
],
/*
@@ -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');
}
};