-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ add more moderation tools to backend
- Loading branch information
1 parent
b93d2bb
commit 041d695
Showing
11 changed files
with
1,867 additions
and
1,737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
database/migrations/2025_01_16_000000_add_moderation_notes_to_statuses.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?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::table('statuses', function(Blueprint $table) { | ||
$table->string('moderation_notes')->nullable() | ||
->after('client_id') | ||
->comment('Notes from the moderation team - visible to the user'); | ||
|
||
$table->boolean('lock_visibility') | ||
->default(false) | ||
->after('moderation_notes') | ||
->comment('Prevent the user from changing the visibility of the status?'); | ||
|
||
$table->boolean('hide_body') | ||
->default(false) | ||
->after('lock_visibility') | ||
->comment('Hide the body of the status from other users?'); | ||
}); | ||
} | ||
|
||
public function down(): void { | ||
Schema::table('statuses', function(Blueprint $table) { | ||
$table->dropColumn(['moderation_notes', 'lock_visibility', 'hide_body']); | ||
}); | ||
} | ||
}; |
Oops, something went wrong.