Skip to content

Commit 40f3d6e

Browse files
committed
docs: enhance README with automatic asset publishing details and configuration options
1 parent ce3f521 commit 40f3d6e

1 file changed

Lines changed: 47 additions & 3 deletions

File tree

README.md

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,57 @@ return [
119119
```
120120
### Assets & Views
121121

122-
Publish dashboard assets:
122+
#### Automatic Publishing (Recommended)
123+
124+
The package includes **automated asset publishing** that automatically updates views and assets when the package is updated. This feature is enabled by default and requires no manual intervention.
125+
126+
When you update the package via Composer, the system will:
127+
- Automatically detect the version change
128+
- Clean up old published files
129+
- Republish the latest views and assets
130+
- Log the process for transparency
131+
132+
#### Manual Publishing
133+
134+
You can still manually publish assets and views if needed:
135+
123136
```bash
137+
# Publish assets
124138
php artisan vendor:publish --tag="request-analytics-assets"
139+
140+
# Publish views for customization
141+
php artisan vendor:publish --tag="request-analytics-views"
142+
143+
# Or use the enhanced command with cleanup
144+
php artisan request-analytics:publish --clean --force
145+
```
146+
147+
#### Configuration
148+
149+
Control the auto-publishing behavior in your `.env` file:
150+
151+
```env
152+
# Enable/disable auto-publishing (default: true)
153+
REQUEST_ANALYTICS_AUTO_PUBLISH_ON_UPDATE=true
154+
155+
# Clean up old files before publishing (default: true)
156+
REQUEST_ANALYTICS_CLEANUP_BEFORE_PUBLISH=true
157+
158+
# Force overwrite existing files (default: true)
159+
REQUEST_ANALYTICS_FORCE_PUBLISH=true
160+
161+
# Log publishing activities (default: true)
162+
REQUEST_ANALYTICS_LOG_PUBLISHING=true
163+
```
164+
165+
To disable auto-publishing completely:
166+
```env
167+
REQUEST_ANALYTICS_AUTO_PUBLISH_ON_UPDATE=false
125168
```
126169

127-
Optionally, publish the views for customization:
170+
When disabled, you'll need to manually republish after package updates:
128171
```bash
129-
php artisan vendor:publish --tag="request-analytics-views"
172+
php artisan request-analytics:publish --clean --force
130173
```
131174

132175
### Automated Data Pruning
@@ -192,6 +235,7 @@ protected function schedule(Schedule $schedule): void
192235
- **Queue Support**: Background processing for high-traffic applications
193236
- **REST API**: Complete programmatic access to analytics data
194237
- **Laravel Integration**: Seamless integration with Laravel's authentication and middleware systems
238+
- **Automated Publishing**: Smart asset and view management with automatic updates
195239

196240
## Usage
197241

0 commit comments

Comments
 (0)