Skip to content

Commit

Permalink
✨ Add publish config
Browse files Browse the repository at this point in the history
  • Loading branch information
juzaweb committed Apr 18, 2021
1 parent 91c3714 commit 7ade023
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/EmailTemplateServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\ServiceProvider;
use Theanh\EmailTemplate\Commands\SendMailCommand;
use Theanh\EmailTemplate\Contracts\SendEmailServiceContract;
use Theanh\EmailTemplate\Helpers\SendEmailService;

class EmailTemplateServiceProvider extends ServiceProvider
{
public function boot()
{
$this->publishes([
__DIR__.'/../config/email-template.php' => config_path('email-template.php'),
], 'config');

$this->loadMigrationsFrom(__DIR__.'/../migrations');

$this->loadViewsFrom(__DIR__ . '/../resources/views', 'emailtemplate');
Expand All @@ -24,12 +26,13 @@ public function boot()

public function register()
{
$this->app->singleton(SendEmailServiceContract::class, function () {
return new SendEmailService();
});

$this->mergeConfigFrom(
__DIR__ . '/../config/email-template.php',
'email-template'
);

$this->commands([
SendMailCommand::class,
]);
}
}
}

0 comments on commit 7ade023

Please sign in to comment.