Skip to content

Commit

Permalink
fix publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
omaralalwi committed Nov 16, 2024
1 parent c45df04 commit eb5a51f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 2 additions & 5 deletions src/LexiTranslateServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eb5a51f

Please sign in to comment.