Packaging
For example, to package the foo application plugin
- Set the version number in
plugin/foo/config/app.php
(important) - Delete unnecessary files in
plugin/foo
, especially temporary files for testing upload functionality inplugin/foo/public
- If your project contains database table creation operations, you need to set up
plugin/foo/install.sql
. Refer to the Database Installation Section - If your project has its own independent database and Redis configuration, make sure to delete these configurations first. These configurations should trigger the installation wizard upon first access to the application (to be implemented by yourself), allowing the administrator to manually fill in and generate.
- If your project includes webman admin backend menus, you need to configure
plugin/foo/config/menu.php
so that these menus are automatically set during plugin installation. For more details, refer to webman-admin Import Menus - Restore other files that need to return to their original state
- After completing the above operations, navigate to the
{main project}/plugin/
directory - Linux users can use the command
zip -r foo.zip foo
to generate foo.zip - Windows users can right-click the foo folder and select
Send to > Compressed (zipped) folder
to generate foo.zip
foo.zip is the packaged file, refer to the next section Publishing the Plugin