refactor: use laravel notifications for system user private messages

This commit is contained in:
Roardom
2025-01-25 09:41:14 +00:00
parent 18ba1a5cc5
commit 6a103cee97
32 changed files with 1007 additions and 122 deletions

View File

@@ -22,9 +22,9 @@ use App\Models\BonExchange;
use App\Models\BonTransactions;
use App\Models\PersonalFreeleech;
use App\Models\User;
use App\Notifications\PersonalFreeleechCreated;
use App\Services\Unit3dAnnounce;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
/**
@@ -97,10 +97,7 @@ class TransactionController extends Controller
Unit3dAnnounce::addPersonalFreeleech($user->id);
$user->sendSystemNotification(
subject: trans('bon.pm-subject'),
message: \sprintf(trans('bon.pm-message'), Carbon::now()->addDays(1)->toDayDateTimeString()).config('app.timezone').'[/b]!',
);
$user->notify(new PersonalFreeleechCreated());
break;
case $bonExchange->invite: