feat: header con mensajes y notificaciones en tiempo real
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,36 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\View\Composers\HeaderComposer;
|
||||
use Illuminate\Support\Facades\Event;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Illuminate\Mail\Events\MessageSending;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
public function register(): void {}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
View::composer('layouts._partials.header', HeaderComposer::class);
|
||||
|
||||
Event::listen(MessageSending::class, function ($event) {
|
||||
$event->message->getHeaders()->addTextHeader(
|
||||
'List-Unsubscribe',
|
||||
'<mailto:bajas@tudominio.com>, <https://tudominio.com/unsubscribe>'
|
||||
);
|
||||
$event->message->getHeaders()->addTextHeader(
|
||||
'List-Unsubscribe-Post',
|
||||
'List-Unsubscribe=One-Click'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
Event::listen(MessageSending::class, function ($event) {
|
||||
|
||||
$event->message->getHeaders()->addTextHeader(
|
||||
'List-Unsubscribe',
|
||||
'<mailto:bajas@tudominio.com>, <https://tudominio.com/unsubscribe>'
|
||||
);
|
||||
|
||||
$event->message->getHeaders()->addTextHeader(
|
||||
'List-Unsubscribe-Post',
|
||||
'List-Unsubscribe=One-Click'
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user