update controllers logic
This commit is contained in:
@@ -3,15 +3,17 @@
|
||||
namespace App\Services\Settings\SchoolCalendar;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Services\ApplicationUrlService;
|
||||
use App\Services\EmailService;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
class SchoolCalendarNotificationService
|
||||
{
|
||||
public function __construct(private EmailService $emailService)
|
||||
{
|
||||
public function __construct(
|
||||
private EmailService $emailService,
|
||||
private ApplicationUrlService $urls,
|
||||
) {
|
||||
}
|
||||
|
||||
public function notify(array $event, array $targets): array
|
||||
@@ -56,7 +58,7 @@ class SchoolCalendarNotificationService
|
||||
|
||||
private function buildBody(array $event): string
|
||||
{
|
||||
$calendarUrl = URL::to('/administrator/calendar_view');
|
||||
$calendarUrl = $this->urls->spaAdministratorCalendarViewUrl();
|
||||
$title = trim((string) ($event['title'] ?? 'School Calendar Update'));
|
||||
$date = (string) ($event['date'] ?? '');
|
||||
$description = trim((string) ($event['description'] ?? ''));
|
||||
|
||||
Reference in New Issue
Block a user