Larapack Hooks Versions Save

Hooks is a extension system for your Laravel application.

v1.0.12

4 years ago

Revert using composer/composer RC usage.

v1.0.11

4 years ago

Fixes compability issues with Laravel 7 (and Voyager)

v1.0.10

4 years ago

Update dependencies

v1.0.9

4 years ago

Added support for Voyager 1.3 and Laravel 6.0

v1.0.8

6 years ago

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

v1.0.7

6 years ago

Use array_get (commit https://github.com/larapack/hooks/commit/779ad2a35a70ad9ab76a30628f3a9bbe0a8f2013) over of ?? (null coalescing operator) since it was only supported in PHP 7+.

v1.0.6

6 years ago

Support single file seeder #36

v1.0.5

6 years ago

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

6 years ago

Add option to disable hooks #28

v1.0.3

6 years ago

Disable XdebugHandler #26