Download the PHP package shahajahan/approval-flow without Composer
On this page you can find all versions of the php package shahajahan/approval-flow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shahajahan/approval-flow
More information about shahajahan/approval-flow
Files in shahajahan/approval-flow
Package approval-flow
Short Description Dynamic Approval Access Control System for Any PHP Framework
License MIT
Informations about the package approval-flow
Approval Flow
A dynamic approval access control system for any PHP framework (Laravel, CodeIgniter, CakePHP, Symfony, or plain PHP). Define and manage multi-level approval roles, with forward/backward flow and permission checks β all framework-agnostic.
π Features
β Framework-agnostic core β Works with Laravel, CodeIgniter, Symfony, CakePHP, or raw PHP β Dynamic approval hierarchy (forward/backward flow) β Dynamic approval (forward/backward flow) with multiple approval flow on same project β Simple adapter pattern for DB access (PDO, Query Builder, or ORM) β PSR-4 and PSR-12 compliant β Extensible and testable
π§© Installation
Via Composer
If youβre developing locally, clone the repo and link:
ποΈ Database Schema
The recommended database schema is defined in database/migrations/2025_10_13_000000_create_approval_tables.php.
βοΈ Usage Examples
πΉ Laravel
πΉ CodeIgniter (v3 or v4)
πΉ Symfony
πΉ CakePHP
πΉ Plain PHP (PDO)
π§ Architecture
- Core Logic:
ApprovalFlow(framework-independent) - Adapters:
LaravelAdapterβ Uses Laravelβs Query Builder (DB Facade)CodeIgniterAdapterβ Uses CIβs$this->dbquery builderPdoAdapterβ Uses native PDO
- Contract:
ApproverInterfaceensures consistency across adapters
π§° Helper Functions
π§ͺ Running Tests
Sample test (tests/ApprovalFlowTest.php) is already included.
π§± Folder Structure
πͺͺ License
This package is open-sourced software licensed under the MIT license.
π¨βπ» Author
Md Shahajahan Ali π§ [email protected] π GitHub: @shahajahan
π Contributing
Pull requests are welcome! To contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Commit changes and push
- Submit a Pull Request π―
π‘ Future Enhancements
- Approval workflow templates (Leave, Expense, Purchase)
- Event hooks (
onApprove,onReject) - JSON-based flow configuration
- Role-based escalation and notifications