Skip to content

Commit

Permalink
Added templates and default template.
Browse files Browse the repository at this point in the history
  • Loading branch information
addgod committed Nov 7, 2019
1 parent 0d9868b commit 08843d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/mandrill-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@

return [
'secret' => env('MANDRILL_SECRET'),

'templates' => [],

'default_template' => '',
];
20 changes: 20 additions & 0 deletions src/MandrillTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ public function __construct()
}
}

/**
* Get the available templates.
*
* @return array
*/
public function templates(): array
{
return config('mandrill-template.templates');
}

/**
* Get the default template.
*
* @return string
*/
public function defaultTemplate(): string
{
return config('mandrill-template.default_template');
}

/**
* Send template as message via mandrill.
*
Expand Down

0 comments on commit 08843d3

Please sign in to comment.