them log, chinh upload
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('activity_logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->nullable()->constrained('users')->nullOnDelete();
|
||||
$table->string('action');
|
||||
$table->text('description');
|
||||
$table->nullableMorphs('subject');
|
||||
$table->json('metadata')->nullable();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('activity_logs');
|
||||
}
|
||||
};
|
||||
@@ -56,6 +56,9 @@ class PermissionSeeder extends Seeder
|
||||
// Dashboard & Export
|
||||
'view-dashboard-widgets',
|
||||
'export-data',
|
||||
|
||||
// Activity Logs
|
||||
'view-activity-logs',
|
||||
];
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
@@ -92,6 +95,7 @@ class PermissionSeeder extends Seeder
|
||||
'create-tag',
|
||||
'update-tag',
|
||||
'view-dashboard-widgets',
|
||||
'view-activity-logs',
|
||||
]);
|
||||
|
||||
// Staff: read + limited write
|
||||
|
||||
Reference in New Issue
Block a user