Skip to content

Releases: larapack/hooks

v1.0.12

10 Mar 13:15
ce2c8c0
Compare
Choose a tag to compare

Revert using composer/composer RC usage.

v1.0.11

09 Mar 17:21
aefee54
Compare
Choose a tag to compare

Fixes compability issues with Laravel 7 (and Voyager)

v1.0.10

04 Mar 21:10
91bc4de
Compare
Choose a tag to compare

Update dependencies

v1.0.9

05 Sep 13:10
ade22d7
Compare
Choose a tag to compare

Added support for Voyager 1.3 and Laravel 6.0

v1.0.8

02 Feb 13:18
a3d84cb
Compare
Choose a tag to compare

Support Windows directory separator #37
Register commands for non-console #38

v1.0.7

25 Jan 10:12
Compare
Choose a tag to compare

Use array_get (commit 779ad2a) over of ?? (null coalescing operator) since it was only supported in PHP 7+.

v1.0.6

22 Jan 14:32
6da4b3d
Compare
Choose a tag to compare

Support single file seeder #36

v1.0.5

21 Jan 14:00
c60bf1c
Compare
Choose a tag to compare

Improve setup flow #30

This adds the option to migrate, seed, publish assets, re-migrate, re-seed, re-publish assets, un-migrate, un-seed and un-publish assets on installation/updating and uninstallation of a hook.

Events

Install

The installation of a hook will run the specific migrations from the hook, along with the hooks seeders and publish-ing the assets.

The migrations can be skipped using the --no-migrate option command-line.
The seeding can be skipped using the --no-seed option command-line.
The publishing of assets can be skipped using the --no-publish option command-line.

Update

The updating of a hook will re-run the un-migrated migrations from the specific hooks along with running all the hooks seeders and publish-ing any non-manually-updated assets.

The migrations can be skipped using the --no-migrate option command-line.
The seeding can be skipped using the --no-seed option command-line.
The publishing of assets can be skipped using the --no-publish option command-line.

Uninstall

The uninstallation of a hook will rollback the migrated migrations from the specific hooks along with running all the hooks un-seeders and un-publishing all the hooks assets.

The migrations can be skipped using the --no-unmigrate option command-line.
The seeding can be skipped using the --no-unseed option command-line.
The publishing of assets can be skipped using the --no-unpublish option command-line.

Changed assets

Any assets that have been changed from the original assets from the hook, will not be overwritten on updating of the hook. Not even if the hook has an update to that file itself.

However, you can tell the system to overwrite the assets anyway using the --force option command-line.

Composer File

The composer file is the key to all this. The hook will have to specify the migrations, seeders, un-seeders and assets paths inside the composer.json file.
You can see an example hook using the migrations, seeders, un-seeders, and assets here.

Assets

The assets have a key and a value inside the composer.json file as you can see below.

"assets": {
    "resources/assets": "public/vendor/migration-hook/assets"
}

The key (resources/assets) is the current location of the assets within the hook folder while the value (public/vendor/migration-hook/assets) is the location to place the assets inside the base application folder.

v1.0.4

17 Jan 09:01
8160159
Compare
Choose a tag to compare

Add option to disable hooks #28

v1.0.3

17 Jan 06:46
7bc3a3b
Compare
Choose a tag to compare

Disable XdebugHandler #26