bfg/installer is a Laravel package for simplify the installation process for certain packages.
It currently has 1 GitHub stars and 688 downloads on Packagist (latest version 0.2.1).
Install it with composer require bfg/installer.
Discover more Laravel packages by bfg
or browse all Laravel packages to compare alternatives.
Last updated
The intent of the functionality is to simplify the installation process for certain packages, it also allows you to bind packages with each other by types for your application or extension.
All you need is to put this package in dependence and inherit from any of your laravel providers, it can be a package or any provider that you create and inherit from a special abstract provider. You will be able to register your providers, specify their dependencies and sequence, very useful when you need to control the connected parts of the laravel. Also, for comfortable work, there is a mini package manager that is used through the composer to quickly install extensions by filtering them by the specified types, in fact, all dependencies in this installer are based on the types of the composer's package.
Complete the package installation process.
php artisan install [<package>]
Options:
-u, --update Update the package after install
-r, --reinstall Reinstall the package after install or update
Show a list of all existing packages on the system.
php artisan packages
Options:
-p, --path Show path provider of extensions
-c, --child Show child name of extensions
-t, --type Show type of extensions
Reinstall the extension, complete uninstallation and full installation.
php artisan reinstall [<package>]
Remove the extension from the system, for complete removal you need to use the "--force" flag.
php artisan uninstall [<package>]
Options:
-f, --force Force uninstall
Update system extension.
php artisan update [<package>]
Options:
-r, --reinstall Reinstall the package after update
Create package extension.
php artisan make [<package>]
Options:
--namespace[=NAMESPACE] The namespace of extension
--description[=DESCRIPTION] The description of extension
--type[=TYPE] The type of extension [default: "bfg-app"]
--ver[=VER] The version of extension [default: "0.0.1"]
Further, you just need to inherit any of the service providers
from Bfg\Installer\Providers\InstalledProvider and you have the following functions and provider
settings at your disposal:
| Property name | Property description | Default |
| --- | --- | --- |
| version | The version of extension. | 0.0.1 |
| name | The name of extension. | [provider-class] |
| child | The child type for sub extensions of extension. | null |
| type | The type to determine who owns the extension. | bfg-app |
| description | The description of extension. | null |
| logo | The logo of extension. | null |
| Method name | Method description |
| --- | --- |
| installed | Executed when the provider is registered and the extension is installed. |
| run | Executed when the provider run method boot and the extension is installed. |
| installed_parent | Executed when the parent provider is registered and the extension is installed. |
| run_parent | Executed when the parent provider run method boot and the extension is installed. |
| install | Run on install extension. |
| update | Run on update extension. |
| uninstall | Run on uninstall extension. |
| dump | Run on dump extension. |
You can use both the standard "boot" and "register", just do not forget to call the parent methods, otherwise the control will not be able to be fully implemented.