bonnier/laravel-email-provider

There is no license information available for the latest version (1.0.0) of this package.

Laravel package to implement translations from Email Manager

1.0.0 2018-01-03 14:26 UTC

This package is auto-updated.

Last update: 2024-11-12 22:19:21 UTC


README

Laravel package that retrieves email translations from translation manager

Usage

To fetch the email

BonnierMail::get($key, $replace, $locale)

Getting translations

To get all translations from Email Manager, run:

php artisan bonnier:translation:get

Setup

  • composer require bonnier/laravel-email-provider
  • Register the provider in config/app.php`
    ...
    'providers' => [
        ...
       Bonnier\EmailProvider\EmailServiceProvider::class, 
    ],
  • Setup configuration in .env
EMAIL_MANAGER_SERVICE_ID=1
EMAIL_MANAGER_URL=http://url-to-translationmanager.com
  • Set up in config/services.php
    'email_manager' => [
        'url' => env('EMAIL_MANAGER_URL'),
        'service_id' => env('EMAIL_MANAGER_SERVICE_ID'),
    ],
  • Set up in config/app.php
    'aliases' => [
        ...,
        'BonnierMail' => \Bonnier\EmailProvider\Helpers\BonnierMail::class,
    ]