A service provider for Alexandre Salome's PHP Mailcatcher SDK
agouticreative/laravel-mailcatcher is a Laravel package for a service provider for alexandre salome's php mailcatcher sdk.
It currently has 0 GitHub stars and 3.811 downloads on Packagist.
Install it with composer require agouticreative/laravel-mailcatcher.
Discover more Laravel packages by agouticreative
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel service provider that returns the data on a Mailcatcher instance as an Eloquent collection of models.
Most of the heavy lifting is done by Mailcatcher SDK for PHP
composer install https://github.com/agouticreative/laravel-mailcatcherAgouti\LaravelMailcatcher\ServiceProvider::class to the providers array in config/app.php'Mailcatcher' => Agouti\LaravelMailcatcher\Facade::class to the aliases array in config/app.phpphp artisan vendor:publishUse Mailcatcher::search() to search the Mailcatcher instance for messages. Search takes an array of filtering arguments in the manner of the aforementioned Mailcatcher PHP SDK. Refer to that repo's instructions to learn more. A simple Mailcatcher::search() will return all messages on Mailcatcher.
The messages' models will have these attributes:
Attachments are not yet supported.
The original message object from the SDK is available as the messageObject property on the message model ($collection[0]->messageObject, for example)
Both the model and the collection have a delete method that will delete messages on Mailcatcher. delete on the collection completely clears out mailcatcher! be careful!