Download the PHP package gsferro/servicemail without Composer
On this page you can find all versions of the php package gsferro/servicemail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gsferro/servicemail
More information about gsferro/servicemail
Files in gsferro/servicemail
Package servicemail
Short Description Service para envio via queue easy no Laravel
License
Informations about the package servicemail
Laravel ServiceMail
Service para envio de e-mail via queue easy no Laravel
Install via composer
composer require gsferro/servicemail
Configuração
- Adicione o ServiceProvider em providers de
app.php
/* --------------------------------------------------- ServiceMail */
\Gsferro\ServiceMail\Providers\ServiceMailServiceProvider::class,
- Adicione em
$listen
o event emEventServiceProvider.php
/* --------------------------------------------------- ServiceMail */ 'Gsferro\ServiceMail\Events\MailerEvent' => [ 'Gsferro\ServiceMail\Listeners\MailerJobListener', ],
- Publish config
php artisan vendor:publish --provider="Gsferro\ServiceMail\Providers\ServiceMailServiceProvider" --tag=config
Uso
- Gerar migration
- php artisan queue:table
- php artisan queue:failed-table
Alternativa ao mailtrap
- set a variavel
SERVICEMAIL_REDIRECT
no .env ou dentro do config/servicemail.php para enviar o email para si como debug/teste
Usando database sqlite
-
Crie o banco local
touch database/database.sqlite
-
Publish Migrations em migrations/servicemail
php artisan vendor:publish --provider="Gsferro\ServiceMail\Providers\ServiceMailServiceProvider" --tag=migrations
-
Altere o arquivo
config/database.php
-
Altere o arquivo
config/queue.php
- Altere o arquivo
.env
-
QUEUE_CONNECTION="sqlite"
Ou coloque direto no arquivo config/queue.php
Rodar migrate
php artisan migrate --database=sqlite --path=database/migrations/jobs
Rodar queue
php artisan queue:work sqlite --tries=3