Download the PHP package dojo-sh/database-mail-templates without Composer
On this page you can find all versions of the php package dojo-sh/database-mail-templates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dojo-sh/database-mail-templates
More information about dojo-sh/database-mail-templates
Files in dojo-sh/database-mail-templates
Download dojo-sh/database-mail-templates
More information about dojo-sh/database-mail-templates
Files in dojo-sh/database-mail-templates
Vendor dojo-sh
Package database-mail-templates
Short Description Your Package Description here
License MIT
Package database-mail-templates
Short Description Your Package Description here
License MIT
Please rate this library. Is it a good library?
Informations about the package database-mail-templates
database-mail-templates
Render laravel mail using a blade template stored in the database
Install
Migrate
php artisan migrate
Publish config
php artisan vendor:publish --provider="DojoSh\DatabaseMailTemplates\DatabaseMailTemplatesServiceProvider" --tag=config
Override default template
php artisan vendor:publish --provider="DojoSh\DatabaseMailTemplates\DatabaseMailTemplatesServiceProvider" --tag=views
Usage
Create a new mailable
php artisan make:database-mail-template {name} {--notification}
Ex. Mailable Class
namespace App\Mail;
use DojoSh\DatabaseMailTemplates\TemplateMailable;
use Illuminate\Contracts\Queue\ShouldQueue;
class TestMail extends TemplateMailable
{
public $templateVariable;
public function __construct($templateVariable)
{
$this->templateVariable = $templateVariable;
}
}
All public properties will be available in the template
Mailable templates admin panel
http://application.link/database-mail-templates
Preview mail
class ContractApprovedMail extends TemplateMailable
{
public $contract;
public function __construct($contract)
{
$this->contract = $contract;
}
// Override this function and return mockup data to preview the mail
public static function getPreviewInstance()
{
return new self(Contract::first());
}
}
Testing
Run the tests with:
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of database-mail-templates with dependencies
PHP Build Version
Package Version
No informations.
The package dojo-sh/database-mail-templates contains the following files
Loading the files please wait ....