added missing translations
This commit is contained in:
@@ -5,9 +5,12 @@ namespace App\Http\Controllers\Api\Tenant;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Event;
|
||||
use App\Models\TenantFeedback;
|
||||
use App\Models\User;
|
||||
use App\Notifications\TenantFeedbackSubmitted;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
class TenantFeedbackController extends Controller
|
||||
{
|
||||
@@ -52,6 +55,15 @@ class TenantFeedbackController extends Controller
|
||||
'metadata' => $validated['metadata'] ?? null,
|
||||
]);
|
||||
|
||||
$recipients = User::query()
|
||||
->where('role', 'super_admin')
|
||||
->whereNotNull('email')
|
||||
->get();
|
||||
|
||||
if ($recipients->isNotEmpty()) {
|
||||
Notification::send($recipients, new TenantFeedbackSubmitted($feedback));
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Feedback gespeichert',
|
||||
'data' => [
|
||||
|
||||
Reference in New Issue
Block a user