Download the PHP package asamserver/wam without Composer
On this page you can find all versions of the php package asamserver/wam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asamserver/wam
More information about asamserver/wam
Files in asamserver/wam
Package wam
Short Description Framework for creating WHMCS addon modules.
License MIT
Informations about the package wam
WHMCS Addon Module Framework
A Laravel-inspired framework for building WHMCS addon modules with modern PHP practices and a familiar structure. This framework provides a robust foundation for developing WHMCS addons with features like routing, MVC architecture, database migrations, and hooks management.
Features
- MVC Architecture
- Route Management
- Database Migrations
- Model Generation
- Controller Generation
- Hook System
- CLI Commands
- Admin & Client Area Support
- Helper Functions
- Resource Management (CSS, JS, Views)
Installation
-
Create a new directory for your addon in the WHMCS modules/addons directory:
-
Clone this repository:
-
Install dependencies:
-
Set up your environment:
- Configure your .env file with appropriate database settings:
Quick Installation
-
Navigate to your WHMCS modules/addons directory:
- Create a new addon using Composer:
Command Line Interface
The framework provides a CLI tool named asam for generating various components. Here are the available commands:
Basic Commands
Directory Structure
Creating Controllers
Controllers handle the business logic of your addon. To create a new controller:
Example controller structure:
Defining Routes
Routes are defined in the routes/web.php file:
Working with Models
Create models to interact with your database:
Example model usage:
Database Migrations
Create and run database migrations:
Example migration:
Working with Hooks
Create and manage WHMCS hooks:
Example hook:
Views and Templates
Views are stored in the resource/views directory. Render views from your controllers:
Helper Functions
The framework provides various helper functions in app/Helper/Helper.php:
Best Practices
- Always use namespaces as defined in the framework
- Follow the MVC pattern
- Use migrations for database changes
- Keep controllers thin and move business logic to services
- Use dependency injection where possible
- Log important events using the built-in logging system
Error Handling
The framework includes built-in error handling:
Contributing
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Support
For support, please open an issue in the GitHub repository or contact the maintainers.
All versions of wam with dependencies
illuminate/database Version ^11.0
illuminate/support Version ^11.33
symfony/console Version ^6.0
vlucas/phpdotenv Version ^5.6