php artisan module:make mynewaddon
where mynewaddon is your addon name that is going to be created. Replace it with your own friendly name.
Created : /your_mumara_path/Addons/Mynewaddon/module.json
Created : /your_mumara_path/Addons/Mynewaddon/Routes/web.php
Created : /your_mumara_path/Addons/Mynewaddon/Routes/api.php
Created : /your_mumara_path/Addons/Mynewaddon/Console/Command.php
Created : /your_mumara_path/Addons/Mynewaddon/Settings/config.php
Created : /your_mumara_path/Addons/Mynewaddon/Settings/install/v1.0.sql
Created : /your_mumara_path/Addons/Mynewaddon/Settings/uninstall/uninstall.sql
Created : /your_mumara_path/Addons/Mynewaddon/Resources/views/index.blade.php
Created : /your_mumara_path/Addons/Mynewaddon/Resources/lang/en/app.php
Created : /your_mumara_path/Addons/Mynewaddon/Config/config.php
Created : /your_mumara_path/Addons/Mynewaddon/composer.json
Created : /your_mumara_path/Addons/Mynewaddon/Resources/assets/css/style.css
Created : /your_mumara_path/Addons/Mynewaddon/Resources/assets/js/app.js
Created : /your_mumara_path/Addons/Mynewaddon/Resources/assets/sass/app.scss
Created : /your_mumara_path/Addons/Mynewaddon/webpack.mix.js
Created : /your_mumara_path/Addons/Mynewaddon/package.json
Created : /your_mumara_path/Addons/Mynewaddon/json.json
Created : /your_mumara_path/Addons/Mynewaddon/menu.json
Created : /your_mumara_path/Addons/Mynewaddon//functions.php
Created : /your_mumara_path/Addons/Mynewaddon/hooks/hooks.php
Created : /your_mumara_path/Addons/Mynewaddon/Database/Seeders/MynewaddonDatabaseSeeder.php
Created : /your_mumara_path/Addons/Mynewaddon/Providers/MynewaddonServiceProvider.php
Created : /your_mumara_path/Addons/Mynewaddon/Providers/RouteServiceProvider.php
Created : /your_mumara_path/Addons/Mynewaddon/Http/Controllers/MynewaddonController.php
Module [Mynewaddon] created successfully.
Addons/
├── Mynewaddon/
├── Config/
├── config.php
├── Console/
├── Command.php
├── Database/
├── factories/
├── Migrations/
├── Seeders/
├── MynewaddonDatabaseSeeder.php
├── Entities/
├── Events/
├── hooks/
├── hooks.php
├── Http/
├── Controllers/
├── MynewaddonController.php
├── Middleware/
├── Requests/
├── Jobs/
├── Listeners/
├── Providers/
├── MynewaddonServiceProvider.php
├── RouteServiceProvider.php
├── Resources/
├── assets/
├── css/
├── style.css
├── js/
├── app.js
├── sass/
├── app.scss
├── lang/
├── en/
├── app.php
├── views/
├── index.blade.php
├── Routes/
├── api.php
├── web.php
├── Settings/
├── install/
├── v1.0.sql
├── uninstall/
├── uninstall.sql
├── config.php
├── Tests/
├── Feature/
├── Unit/
├── composer.json
├── functions.php
├── json.json
├── menu.json
├── module.json
├── package.json
├── webpack.mix.js
Parameter | Description |
---|---|
name | Name of the Addon that will appear on the Addons page |
vendor | Your Company name that should appear as a Vendor |
type | The type of addon e.g. Integration, Nodes or any helpful category |
logo | The URL of the addon logo that will appear on the addons page e.g. https://via.placeholder.com/1200x450 |
slider | The URLs of the addon screenshots that will appear in the preview lightbox e.g. ['https://via.placeholder.com/1200x450','https://via.placeholder.com/1200x450','//via.placeholder.com/1200x450'] |
version | The version number of this addon |
route | The URL route of the addon e.g. mumaradomain.com/mynewaddon/. This must be a single word without spaces or characters except for dashes or underscores e.g route('mynewaddon') |
description | The description of the addon that will appear on the addons page |
read_more | URL of the addon details page |
install_dir | It will be auto-fetched. You don't have to change this value |
new_version_url | The URL from where Mumara can fetch the latest version number and display the "Update" button on the addons page when there is a new version available. e.g https://mydomain.com/addons/mynewaddon/version.json Note! The file extension could be any e.g. json, php, txt, etc. The content of the file should only contain version number in numeric format e.g. 1.0 or 1.1.3 or 3.7.5
|
update_url | The download link of the latest version of the addon when an update is available. e.g https://mydomain.com/addons/mynewaddon/update.zip |
/**
* Created by Mynewaddon
*/
/*-------------- mynewaddon ----------------*/
$lang['mynewaddon']['page']['title'] = 'Mynewaddon Page';
$lang['mynewaddon']['page']['description'] = 'Description Goes Here 123';
$lang['mynewaddon']['view']['all'] = 'View All';
return $lang;
trans('mynewaddon::app.mynewaddon.page.title')
[{
"title": "Mynewaddon Addon",
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" class=\"kt-svg-icon\">\r\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <rect id=\"bound\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\r\n <path d=\"M10.5,5 L19.5,5 C20.3284271,5 21,5.67157288 21,6.5 C21,7.32842712 20.3284271,8 19.5,8 L10.5,8 C9.67157288,8 9,7.32842712 9,6.5 C9,5.67157288 9.67157288,5 10.5,5 Z M10.5,10 L19.5,10 C20.3284271,10 21,10.6715729 21,11.5 C21,12.3284271 20.3284271,13 19.5,13 L10.5,13 C9.67157288,13 9,12.3284271 9,11.5 C9,10.6715729 9.67157288,10 10.5,10 Z M10.5,15 L19.5,15 C20.3284271,15 21,15.6715729 21,16.5 C21,17.3284271 20.3284271,18 19.5,18 L10.5,18 C9.67157288,18 9,17.3284271 9,16.5 C9,15.6715729 9.67157288,15 10.5,15 Z\" id=\"Combined-Shape\" fill=\"#000000\"></path>\r\n <path d=\"M5.5,8 C4.67157288,8 4,7.32842712 4,6.5 C4,5.67157288 4.67157288,5 5.5,5 C6.32842712,5 7,5.67157288 7,6.5 C7,7.32842712 6.32842712,8 5.5,8 Z M5.5,13 C4.67157288,13 4,12.3284271 4,11.5 C4,10.6715729 4.67157288,10 5.5,10 C6.32842712,10 7,10.6715729 7,11.5 C7,12.3284271 6.32842712,13 5.5,13 Z M5.5,18 C4.67157288,18 4,17.3284271 4,16.5 C4,15.6715729 4.67157288,15 5.5,15 C6.32842712,15 7,15.6715729 7,16.5 C7,17.3284271 6.32842712,18 5.5,18 Z\" id=\"Combined-Shape\" fill=\"#000000\" opacity=\"0.3\"></path>\r\n </g>\r\n</svg>",
"url": "mynewaddon/addon",
"hasChild": true,
"childrens": [
{
"title": "Mynewaddon Child 1",
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" class=\"kt-svg-icon\">\r\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <rect id=\"bound\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\r\n <path d=\"M10.5,5 L19.5,5 C20.3284271,5 21,5.67157288 21,6.5 C21,7.32842712 20.3284271,8 19.5,8 L10.5,8 C9.67157288,8 9,7.32842712 9,6.5 C9,5.67157288 9.67157288,5 10.5,5 Z M10.5,10 L19.5,10 C20.3284271,10 21,10.6715729 21,11.5 C21,12.3284271 20.3284271,13 19.5,13 L10.5,13 C9.67157288,13 9,12.3284271 9,11.5 C9,10.6715729 9.67157288,10 10.5,10 Z M10.5,15 L19.5,15 C20.3284271,15 21,15.6715729 21,16.5 C21,17.3284271 20.3284271,18 19.5,18 L10.5,18 C9.67157288,18 9,17.3284271 9,16.5 C9,15.6715729 9.67157288,15 10.5,15 Z\" id=\"Combined-Shape\" fill=\"#000000\"></path>\r\n <path d=\"M5.5,8 C4.67157288,8 4,7.32842712 4,6.5 C4,5.67157288 4.67157288,5 5.5,5 C6.32842712,5 7,5.67157288 7,6.5 C7,7.32842712 6.32842712,8 5.5,8 Z M5.5,13 C4.67157288,13 4,12.3284271 4,11.5 C4,10.6715729 4.67157288,10 5.5,10 C6.32842712,10 7,10.6715729 7,11.5 C7,12.3284271 6.32842712,13 5.5,13 Z M5.5,18 C4.67157288,18 4,17.3284271 4,16.5 C4,15.6715729 4.67157288,15 5.5,15 C6.32842712,15 7,15.6715729 7,16.5 C7,17.3284271 6.32842712,18 5.5,18 Z\" id=\"Combined-Shape\" fill=\"#000000\" opacity=\"0.3\"></path>\r\n </g>\r\n</svg>",
"url": "#"
},
{
"title": "Mynewaddon Child 2",
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" class=\"kt-svg-icon\">\r\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <rect id=\"bound\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\r\n <path d=\"M10.5,5 L19.5,5 C20.3284271,5 21,5.67157288 21,6.5 C21,7.32842712 20.3284271,8 19.5,8 L10.5,8 C9.67157288,8 9,7.32842712 9,6.5 C9,5.67157288 9.67157288,5 10.5,5 Z M10.5,10 L19.5,10 C20.3284271,10 21,10.6715729 21,11.5 C21,12.3284271 20.3284271,13 19.5,13 L10.5,13 C9.67157288,13 9,12.3284271 9,11.5 C9,10.6715729 9.67157288,10 10.5,10 Z M10.5,15 L19.5,15 C20.3284271,15 21,15.6715729 21,16.5 C21,17.3284271 20.3284271,18 19.5,18 L10.5,18 C9.67157288,18 9,17.3284271 9,16.5 C9,15.6715729 9.67157288,15 10.5,15 Z\" id=\"Combined-Shape\" fill=\"#000000\"></path>\r\n <path d=\"M5.5,8 C4.67157288,8 4,7.32842712 4,6.5 C4,5.67157288 4.67157288,5 5.5,5 C6.32842712,5 7,5.67157288 7,6.5 C7,7.32842712 6.32842712,8 5.5,8 Z M5.5,13 C4.67157288,13 4,12.3284271 4,11.5 C4,10.6715729 4.67157288,10 5.5,10 C6.32842712,10 7,10.6715729 7,11.5 C7,12.3284271 6.32842712,13 5.5,13 Z M5.5,18 C4.67157288,18 4,17.3284271 4,16.5 C4,15.6715729 4.67157288,15 5.5,15 C6.32842712,15 7,15.6715729 7,16.5 C7,17.3284271 6.32842712,18 5.5,18 Z\" id=\"Combined-Shape\" fill=\"#000000\" opacity=\"0.3\"></path>\r\n </g>\r\n</svg>",
"url": "#"
},
{
"title": "All Childs",
"icon": "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" class=\"kt-svg-icon\">\r\n <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\r\n <rect id=\"bound\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\r\n <path d=\"M10.5,5 L19.5,5 C20.3284271,5 21,5.67157288 21,6.5 C21,7.32842712 20.3284271,8 19.5,8 L10.5,8 C9.67157288,8 9,7.32842712 9,6.5 C9,5.67157288 9.67157288,5 10.5,5 Z M10.5,10 L19.5,10 C20.3284271,10 21,10.6715729 21,11.5 C21,12.3284271 20.3284271,13 19.5,13 L10.5,13 C9.67157288,13 9,12.3284271 9,11.5 C9,10.6715729 9.67157288,10 10.5,10 Z M10.5,15 L19.5,15 C20.3284271,15 21,15.6715729 21,16.5 C21,17.3284271 20.3284271,18 19.5,18 L10.5,18 C9.67157288,18 9,17.3284271 9,16.5 C9,15.6715729 9.67157288,15 10.5,15 Z\" id=\"Combined-Shape\" fill=\"#000000\"></path>\r\n <path d=\"M5.5,8 C4.67157288,8 4,7.32842712 4,6.5 C4,5.67157288 4.67157288,5 5.5,5 C6.32842712,5 7,5.67157288 7,6.5 C7,7.32842712 6.32842712,8 5.5,8 Z M5.5,13 C4.67157288,13 4,12.3284271 4,11.5 C4,10.6715729 4.67157288,10 5.5,10 C6.32842712,10 7,10.6715729 7,11.5 C7,12.3284271 6.32842712,13 5.5,13 Z M5.5,18 C4.67157288,18 4,17.3284271 4,16.5 C4,15.6715729 4.67157288,15 5.5,15 C6.32842712,15 7,15.6715729 7,16.5 C7,17.3284271 6.32842712,18 5.5,18 Z\" id=\"Combined-Shape\" fill=\"#000000\" opacity=\"0.3\"></path>\r\n </g>\r\n</svg>",
"url": "mynewaddon/addon"
}
]
}]
<?php
use App\Classes\AddonHooks;
/****** Hook to append addon js to footer */
AddonHooks::add_hook('hook_name', function($args) {
return "<script>console.log('Mynewaddon')</script>";
},'addons_script'); // addons_script is the section in footer for js
Function | Description |
---|---|
checkDependency | The code here runs as a dependency checker before proceeding further. (optional) |
checkLicense | The code here will run after the dependency checker and it's used to verify the license from the remote location. (optional) |
update_addon | After getting a success response from checkDependency and checkLicense, Mumara will fetch the update URL from this function and start the update. |
install_addon | After getting a success response from checkDependency and checkLicense, Mumara will continue with the installation process. |