Install the package via Composer:
composer require vendor/package-name
Publish the package's configuration (if needed) and assets:
php artisan vendor:publish --provider="Vendor\PackageName\PackageServiceProvider"
Enable the package in config/app.php under providers:
Vendor\PackageName\PackageServiceProvider::class,
The package will now automatically intercept requests during Composer operations (install/update) and display a blocking "app updating" page with auto-refresh functionality. No additional setup is required for basic usage.
post-install-cmd/post-update-cmd) and blocks HTTP requests during package installation/updates.refresh_interval in the config file (default: 2000ms).resources/views/vendor/package-name/updating.blade.php.config/package-name.php:
'excluded_routes' => [
'health-check',
],
PACKAGE_NAME_DISABLE=true
Vendor\PackageName\Http\Middleware\CheckForUpdates) is registered before other middleware that might handle 404s or errors.php artisan cache:clear) if the package behaves unexpectedly after updates.config/package-name.php to log Composer process detection:
'debug' => env('PACKAGE_NAME_DEBUG', false),
composer.json lock file or process list:
ps aux | grep composer
Vendor\PackageName\Services\UpdateDetector class to add pre/post-update hooks.event(new \Vendor\PackageName\Events\UpdateStarted());
production) in the config:
'enabled_envs' => ['production', 'staging'],
composer.json locks). Override only if necessary.app/Http/Kernel.php:
protected $middlewareGroups = [
'web' => [
\Vendor\PackageName\Http\Middleware\CheckForUpdates::class,
// ... other middleware
],
];
How can I help you explore Laravel packages today?