Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,24 @@ If you want to publish a config file you can use this command:
php artisan vendor:publish --tag="laravel-user-monitoring-config"
```

If you want to publish migration files you can use this command:
If you want to publish the migrations you can use this command:

```shell
php artisan vendor:publish --tag="laravel-user-monitoring-migrations"
```

If you want to publish the views you can use this command:

```shell
php artisan vendor:publish --tag="laravel-user-monitoring-views"
```

If you want to publish the middlewares you can use this command:

```shell
php artisan vendor:publish --tag="laravel-user-monitoring-middlewares"
```

For convenience, you can use this command to publish config and migration files:

```shell
Expand Down
13 changes: 13 additions & 0 deletions src/Providers/LaravelUserMonitoringServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function boot()
$this->publishConfig();
$this->publishMigrations();
$this->publishViews();
$this->publishMiddleware();

$this->viewComposer();
}
Expand Down Expand Up @@ -80,6 +81,18 @@ private function publishViews()
], 'laravel-user-monitoring-views');
}

/**
* Publish middleware files.
*
* @return void
*/
private function publishMiddleware()
{
$this->publishes([
__DIR__ . '/../Middlewares' => app_path('Http/Middleware'),
], 'laravel-user-monitoring-middlewares');
}

/**
* View Composer.
*
Expand Down