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
|
|
|
|
*
|
2023-01-28 23:21:40 +01:00
|
|
|
* @copyright Copyright (c) 2023. 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([
|
2022-06-21 11:57:17 +02:00
|
|
|
__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([]);
|
|
|
|
// });
|
|
|
|
|
2022-06-21 11:57:17 +02:00
|
|
|
$this->app->bind(CssInlinerPlugin::class, function ($app) {
|
2021-06-14 14:50:28 +02:00
|
|
|
return new CssInlinerPlugin([]);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|