Skip to content

2. Installation

Timucin edited this page Apr 1, 2025 · 5 revisions

Installation

The recommended installation is using composer require --dev toramanlis/laravel-implicit-migrations command. Since this will make the implication attributes unavailable in production, if you want to use attributes for implications you have to take one of the following approaches:

Publishing The Attributes

You can publish the attribute classes with php artisan vendor:publish --tag=implication-attributes and add the line "database/attributes/composer.json" in the composer.json file like this:

...
"extra": {
    "merge-plugin": {
        "include": [
            "database/attributes/composer.json"
        ]
    }
}
...

Opting Out From Attributes

Each and every one of the implications are available as both attributes and annotations. You can completely give up using attributes and switch to the annotation notation with no missing functionality.

Installing To Production

Alternatively, you can always install the package with composer install toramanlis/laravel-implicit-migrations without the --dev option. Having a tool like this in production sure is unnecessary, but it's just that, unnecessary.