feat(accound deactivated notification)
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user