Create a new Plugin

1. Use the command line
- Split the file
- Create compressed file
 
How to create a new plugin
 
To create a new plugin in SCart, you have 2 ways:
1. Use the command line
- Create a Plugin and automatically split the file to separate directories

php artisan sc:make plugin --name=Payment/DemoPlugin1 --download=0

Payment: Name of Plugin type (See Plugin types HERE)
DemoPlugin1: Is your Key Name Plugin
+ "--download=0": Specify create plugin and split file. It is not required.
Create new plugin
After creating the Plugin successfully, the new file structure will be as follows:
SCart-folder/

├── app
│     ├── Plugins
│            ├── Payment
│             |          |___DemoPlugin1
│             |___Shipping
├── public
│     ├── Plugins
│            ├── Payment
│             |           |___DemoPlugin1
│             |___Shipping
 |__ ...

- Create compressed file

php artisan sc:make plugin --name=Payment/DemoPlugin2 --download=1

Note:
Must have the value "--download=1" to create a compressed file

Dòng lệnh này tạo thành 1 file .zip chuẩn, có thểm import hoặc upload lên thư viện của SCart
Create new plugin
The resulting command line returns field "Path", which is the name of the compressed file created in the "storage/tmp" directory.


 

Related topics

Latest Document