feat(accound deactivated notification)

This commit is contained in:
2026-04-07 17:09:25 +02:00
parent 6754d8684a
commit ca464e8e06
10 changed files with 236 additions and 14 deletions

View File

@@ -3,23 +3,22 @@
namespace App\Services;
use App\Models\Contact;
use App\Notifications\ContactNewRequestNotification;
use Illuminate\Support\Facades\Notification;
class ContactService
{
public function __construct()
{
//
}
public function __construct() {}
public function registerNewContactRequest(array $data): Contact
{
$contact = new Contact();
$contact = new Contact;
$contact->fill($data);
$contact->save();
// Envoyer un email à l'administrateur
Notification::route('mail', config('app.admin_email'))
->notify(new ContactNewRequestNotification($contact));
return $contact;
}
}