ZHXCore CMS

Plugin Development


About Plugin Development

To kickstart your own unique project, you will need to create plugins. With a single command, you can scaffold your plugin and get down to developing it within seconds.

{info} Resist the temptation to modify any ZHXCORE file and extend ZHXCORE through plugins.

Creating a new plugin

To scaffold your new plugin, run the following code:

php artisan zhxcore:plugin:create

The above command will place your new plugin into the /platform/plugins/

Activating a plugin

Ready to activate, run the following command

php artisan zhxcore:plugin:activate

When activating a plugin the following things occur:

  • Plugin migration runs automatically
  • Application Cache Cleared
  • Admin menu item added
  • Permissions Registered
  • Plugin routes are accessible

{info} Plugins can be activated from the administration panel as well

Deactivating a plugin

Ready to deactivate, run the following command

php artisan zhxcore:plugin:deactivate

When deactivating a plugin the following things occur:

  • Application Cache Cleared
  • Menu Item Removed
  • Permissions are removed
  • Plugin routes become unregistered
  • Database tables DO NOT get removed

{info} Plugins can be deactivated from the administration panel as well

Removing a plugin

Ready to remove, run the following command

php artisan zhxcore:plugin:remove

When deactivating a plugin the following things occur:

  • Application Cache Cleared
  • Plugin reactivated if active
  • Menu Item Removed
  • Permissions are removed
  • Plugin routes become unregistered
  • Database tables and data deleted

{info} Plugins can be remove from the administration panel as well