A plugin lets you add an individual bit of additional functionality, or allows modifying data that is being handled by the system. Follow our development guide to build your own useful plugin.
Learn about what a plugin is, a plugin's basic structure and how to initially configure your own plugin.
Controllers contain the logic of the plugin and is where most of your code will go. SupportPal is built on top of the Laravel framework, and thus most of the features available in the framework are also available to you to use in plugins, such as caching and the query builder.
Routes allow you to create additional pages in the system that can only be accessed when the plugin is active. All of your routes must be placed in one or several PHP files in the Routes folder. You can register a route for any HTTP verb, the most common Router methods are get(), post(), put() and delete().
Translate your plugin for several different languages with ease.
Create your own templates for viewing pages in the plugin.
SupportPal comes with a PluginSetting model that can be used to store any settings required for the plugin to operate.
You may wish to restrict some actions or views in your plugin to certain operator roles only, and this can be achieved by using the permissions system.
Plugins can define their own reports, which will be visible on the report dashboard within the operator panel.
Form requests let you validate request data before handling it in the controller action.
SupportPal was built with Eloquent ORM, an ActiveRecord implementation with the idea that each record, be it a ticket, user or even an activity log message is a model. Each model has a lifecycle, firing different events when the model is created, updated or deleted. Model events allow you to hook on to these events and use or update the model data as needed.
Plugins give you the option to inject data in to and completely override existing templates.
If your plugin needs to perform a recurring task, you can set up a scheduled task to run on your chosen schedule for the plugin.
Use our mailer class to make sending email through your plugin simpler.
Plugins can be used to register your own Artisan commands that are run on the command line interface (CLI).
It is common you may wish to update the plugin at some point after the initial version and add new settings, permissions or modify the database. This can be done by making use of the simple plugin upgrade system that can run targeted code when the currently installed version is below the new plugin version.