1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/app/Providers/MailCssInlinerServiceProvider.php

55 lines
1.3 KiB
PHP
Raw Normal View History

2021-06-14 14:50:28 +02:00
<?php
2021-06-17 09:48:23 +02:00
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
2022-04-27 05:20:41 +02:00
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
2021-06-17 09:48:23 +02:00
*
* @license https://www.elastic.co/licensing/elastic-license
*/
2021-06-14 14:50:28 +02:00
namespace App\Providers;
use App\Utils\CssInlinerPlugin;
2022-02-18 09:06:09 +01:00
use Illuminate\Container\Container;
2021-06-14 14:50:28 +02:00
use Illuminate\Mail\MailManager;
use Illuminate\Support\ServiceProvider;
class MailCssInlinerServiceProvider extends ServiceProvider
{
// Thanks to @fedeisas/laravel-mail-css-inliner
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->publishes([
__DIR__.'/../config/css-inliner.php' => base_path('config/css-inliner.php'),
2021-06-14 14:50:28 +02:00
], 'config');
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
2022-02-18 09:06:09 +01:00
// $this->app->singleton(CssInlinerPlugin::class, function ($app) {
// return new CssInlinerPlugin([]);
// });
// $this->app->singleton(CssInlinerPlugin::class, function ($app) {
// return new CssInlinerPlugin([]);
// });
$this->app->bind(CssInlinerPlugin::class, function ($app) {
2021-06-14 14:50:28 +02:00
return new CssInlinerPlugin([]);
});
}
}