1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/docs/custom_modules.rst

58 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2016-12-07 22:16:11 +01:00
Custom Modules
==============
Invoice Ninja support customs modules using https://github.com/nWidart/laravel-modules
Install Module
""""""""""""""
To install a module run:
2016-12-07 22:17:28 +01:00
.. code-block:: php
2016-12-07 22:16:11 +01:00
php artisan module:install <vendor/module> --type=github
For example:
2016-12-07 22:17:28 +01:00
.. code-block:: php
2016-12-07 22:16:11 +01:00
php artisan module:install invoiceninja/sprockets --type=github
You can check the current module status with:
2016-12-07 22:17:28 +01:00
.. code-block:: php
2016-12-07 22:16:11 +01:00
php artisan module:list
Create Module
"""""""""""""
Run the following command to create a module:
2016-12-07 22:17:28 +01:00
.. code-block:: php
2016-12-07 22:16:11 +01:00
php artisan module:make <module>
.. Note:: To use the standard app layout change the top of Modules/<module>/Resources/views/index.blade.php to ``@extends('header')``
.. Tip:: You can specify the module icon by setting a value from http://fontawesome.io/icons/ for "icon" in modules.json.
Share Module
""""""""""""
To share your module create a new project on GitHub and then commit the code:
2016-12-07 22:17:28 +01:00
.. code-block:: php
2016-12-07 22:16:11 +01:00
cd Modules/<module>
git init
git add .
git commit -m "Initial commit"
git remote add origin git@github.com:<vendor/module>.git
git push -f origin master
.. Tip:: Add ``"type": "invoiceninja-module"`` to the composer.json file to help people find your module.
2016-12-07 22:17:28 +01:00
Finally, submit the project to https://packagist.org.