From eb5a51f656b93dd84a41554820ab92f74cbe8f0d Mon Sep 17 00:00:00 2001 From: omaralalwi Date: Sat, 16 Nov 2024 23:31:42 +0300 Subject: [PATCH] fix publishing --- README.md | 10 +++++++++- composer.json | 2 +- src/LexiTranslateServiceProvider.php | 7 ++----- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 45ce98c..5b9d460 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,15 @@ composer require omaralalwi/lexi-translate ### Publishing Configuration File ```bash -php artisan vendor:publish --provider="Omaralalwi\LexiTranslate\Providers\LexiTranslateServiceProvider" --tag=config +php artisan vendor:publish --tag=lexi-translate +``` + +update table name (if you need, before migration) or any thing in config file if you need . + +### Publishing Migration File (optional) + +```bash +php artisan vendor:publish --tag=lexi-migrations ``` ### Migration for `translations` Table diff --git a/composer.json b/composer.json index 2564606..b7908d6 100644 --- a/composer.json +++ b/composer.json @@ -36,7 +36,7 @@ "homepage": "https://github.com/omaralalwi/lexi-translate", "license": "MIT", "type": "library", - "version": "1.0.1", + "version": "1.0.2", "authors": [ { "name": "Omar alalwi", diff --git a/src/LexiTranslateServiceProvider.php b/src/LexiTranslateServiceProvider.php index 4116bd8..0a54562 100644 --- a/src/LexiTranslateServiceProvider.php +++ b/src/LexiTranslateServiceProvider.php @@ -12,21 +12,18 @@ public function boot() $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); if ($this->app->runningInConsole()) { - // Publish config file $this->publishes([ __DIR__.'/../config/config.php' => config_path('lexi-translate.php'), - ], 'config'); + ], 'lexi-translate'); - // Publish migrations $this->publishes([ __DIR__.'/../database/migrations/' => database_path('migrations'), - ], 'migrations'); + ], 'lexi-migrations'); } } public function register() { - // Merge default configuration $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'lexi-translate'); // Register the singleton