Originally published at: http://www.sitepoint.com/build-octobercms-widget-plugin/
In a previous article we talked about the basics of creating an OctoberCMS plugin. In this one, we’re going to go deeper, and we’ll explore how we can extend the OctoberCMS backend using widgets.
What We Are Going To Build
I will assume that many of you have used WordPress. On the dashboard, we have a quick draft widget. In this article, we’re going to see how we can build a similar one for OctoberCMS.
Plugin Registration
To start building our plugin, we’ll use a command utility for scaffolding.
php artisan create:plugin RAFIE.quicknote
The command will create a Plugin.php
file and an updates
folder containing the version.yaml
file.
public function pluginDetails(){
return [
'name' => 'Quick Note Widget',
'description' => 'Add and manage some drafts when you\'re in a hurry.',
'author' => 'RAFIE Younes',
'icon' => 'icon-pencil'
];
}
After registering our plugin we need to update our version.yaml
file.
// uploads/version.yaml
1.0.1: First version of quicknote
1.0.2:
- Created Notes Table
- create_notes_table.php