Skip to content

Commit

Permalink
Config: publishable by --tag
Browse files Browse the repository at this point in the history
  • Loading branch information
charjr committed Dec 15, 2022
1 parent 465d655 commit 07b3819
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ Require the `membrane/laravel` package in your composer.json and update your dep
composer require membrane/laravel
```

[//]: # (### Configuration)
### Configuration

[//]: # ()
The defaults are set in `config/membrane.php`.
To publish a copy to your own config, use the following:

[//]: # (No config options currently)
```text
php artisan vendor:publish --tag="membrane"
```

### Global Usage

Expand Down
6 changes: 2 additions & 4 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
public function boot(): void
{
$this->publishes([
/** @phpstan-ignore-next-line */ // Cannot
__DIR__ . '/../config/membrane.php' => config_path('membrane.php'),
]);
/** @phpstan-ignore-next-line */ // config_path is a laravel framework helper method
$this->publishes([__DIR__ . '/../config/membrane.php' => config_path('membrane.php')], ['membrane']);
}

public function register(): void
Expand Down

0 comments on commit 07b3819

Please sign in to comment.