Skip to content

Installation

john-it-com/bc-contacts is a private PHP package hosted on packagist.com. It can be installed using composer. To install the package add the private john-it-com packagist repository to the composer.json of your project:

    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.packagist.com/john-it-com/",
            "canonical": false
        },
    ],

Also the authentication data for the private packagist repository must be added to your composer configuration at ~/.config/composer/auth.json:

{
    "http-basic": {
        "repo.packagist.com": {
            "username": "johnit",
            "password": "SEE PASSWORD MANAGER"
        }
    }
}

Next you can install the package using the following command:

composer require john-it-com/bc-contacts

This package includes several configuration files which need to be published:

php artisan vendor:publish --provider="JohnIt\Bc\Contacts\PackageServiceProvider"

The package includes some Javascript and CSS assets which need to be published to the public-folder of your main application. To publish those assets execute the following command:

php artisan vendor:publish --tag=public --force

These assets should also be commited.

To keep the assets up-to-date and avoid issues in future updates, you may add the vendor:publish --tag=public --force command to the post-update-cmd scripts in your application’s composer.json file. This will autopmatically execute artisan vendor:publish command on composer updates:

{
    "scripts": {
        "post-update-cmd": [
             "@php artisan vendor:publish --tag=public --force"
        ]
    }
}

This package registers several database migrations to your application which must be applied:

php artisan migrate