smsami-07 / plugin
This is a Test Plugin
dev-master
2022-02-17 10:00 UTC
This package is not auto-updated.
Last update: 2024-09-27 16:50:24 UTC
README
Steps to Make Custom Composer Plugin
- Create Empty Folder and name it i.e., e.g., plugin
- Open it in Visual Studio or other IDE
- create composer.json file in main directory
- create another folder in main directory and name it "src".
- create custom classes in "src" folder.
- use namespace as "App" i.e., e.g., namesapce App\Controller
- Run composer init command and enter the minimum required fields, after that register namespace in composer.json as e.g., { "autoload" : { "psr-4" : { "App\" : "src/" } } }
- run command composer dump-autoload -0
- create index.php file in main directory
- paste require_once realpath("vendor/autoload.php") in index.php
- Now You can call all the controllers functions there