Download the PHP package miladyousefi/whmcs without Composer
On this page you can find all versions of the php package miladyousefi/whmcs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download miladyousefi/whmcs
More information about miladyousefi/whmcs
Files in miladyousefi/whmcs
Package whmcs
Short Description Framework for creating WHMCS addon modules.
License MIT
Informations about the package whmcs
WHMCS Addon Module Framework (WAM)
WAM is a powerful framework designed to simplify the creation and management of WHMCS addon modules. It provides a structured approach with modern PHP practices and helpful CLI commands.
Installation
To create a new WHMCS addon module, use Composer:
This will create a new directory with your addon name and install all necessary dependencies.
Directory Structure
After installation, your project will have the following structure:
Available Commands
WAM comes with several CLI commands to help you build your addon module:
1. Create Addon Module
This command will:
- Create the main addon file
- Set up the basic directory structure
- Generate necessary dispatcher files
- Create a base controller
- Set up routing configuration
Output:
2. Create Controller
Creates a new controller with basic structure and routing.
Output:
3. Create Model
Generates a new Eloquent model class.
Output:
4. Create Migration
Creates a new database migration file.
Output:
5. Create Environment File
Creates a .env file from .env.example if it doesn't exist.
Output:
Configuration
Environment Variables
The following environment variables can be configured in your .env
file:
Routes
Define your routes in routes/web.php
:
Views and Assets
Views
Place your view files in resource/views/
. The BaseController provides a renderView
method:
CSS and JavaScript
- CSS files go in
resource/css/
- JavaScript files go in
resource/js/
- Access them using
renderCss()
andrenderJs()
methods in BaseController
Helper Functions
The framework provides several helper functions in app/Helper/Helper.php
:
generateRandomNumber()
: Generates a random numbergetClientId()
: Gets the current client IDgetControllerClass()
: Gets the fully qualified controller class name
Best Practices
- Always use the provided CLI commands to generate new files
- Follow PSR-4 autoloading standards
- Use migrations for database changes
- Keep controllers thin and move business logic to models
- Use environment variables for configuration
- Follow WHMCS security best practices
Requirements
- PHP >= 8.0
- WHMCS installation
- Composer
Dependencies
The framework includes:
- illuminate/database
- symfony/console
- vlucas/phpdotenv
License
This project is licensed under the MIT License.