From 491d3f647ba591774ff55329919d43024890a531 Mon Sep 17 00:00:00 2001 From: Alex Vanderbist Date: Tue, 16 Oct 2018 15:04:05 +0200 Subject: [PATCH] Always publish migrations --- README.md | 8 +++++--- src/MailTemplatesServiceProvider.php | 2 -- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3770411..fb45626 100644 --- a/README.md +++ b/README.md @@ -57,14 +57,16 @@ You can install the package via composer: composer require spatie/laravel-database-mail-templates ``` -If you want to use the [default `MailTemplate` model](#default-mailtemplate-model), all that's left to do is run `php artisan migrate` to create the `mail_templates` table. There's no need to publish the migration. - -If you plan on creating a [custom `MailTemplate` model](#custom-mailtemplate-model) continue by publishing the migration: +Publish and run the database migrations: ```bash php artisan vendor:publish --provider="Spatie\MailTemplates\MailTemplatesServiceProvider" --tag="migrations" ``` +If you want to use the [default `MailTemplate` model](#default-mailtemplate-model), all that's left to do is run `php artisan migrate` to create the `mail_templates` table. + +If you plan on creating a [custom `MailTemplate` model](#custom-mailtemplate-model) continue by modifying the migration and creating your custom model before running `php artisan migrate`. + ## Usage After installing the package and running the migrations you'll have a new table in your database called `mail_templates`. This table will be used by the `MailTemplate` model. diff --git a/src/MailTemplatesServiceProvider.php b/src/MailTemplatesServiceProvider.php index 944567a..bfc827f 100644 --- a/src/MailTemplatesServiceProvider.php +++ b/src/MailTemplatesServiceProvider.php @@ -9,8 +9,6 @@ class MailTemplatesServiceProvider extends ServiceProvider public function boot() { if ($this->app->runningInConsole()) { - $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); - $this->publishes([ __DIR__.'/../database/migrations/' => database_path('migrations'), ], 'migrations');