Download the PHP package rawnoq/laravel-hmvc without Composer

On this page you can find all versions of the php package rawnoq/laravel-hmvc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-hmvc

Laravel HMVC Package

A professional, feature-rich Hierarchical Model-View-Controller (HMVC) package for Laravel applications. This package provides a complete modular architecture solution with automatic route loading, view registration, migration management, and comprehensive Artisan command support.

๐Ÿ“‹ Table of Contents

โœจ Features

Core Features

Artisan Commands

Supported Components

All Laravel make: commands support the --module option:

๐Ÿ“ฆ Requirements

๐Ÿš€ Installation

Step 1: Install via Composer

The package will automatically register PSR-4 autoloading for your modules. No manual configuration needed!

Step 2: Publish Configuration (Optional)

This will publish the configuration file to config/hmvc.php.

Step 3: Publish Stubs (Optional)

This will publish module stubs to stubs/hmvc/module/ for customization.

โš ๏ธ Note on Autoloading

The package automatically registers PSR-4 autoloading for the Modules namespace. You do not need to manually add it to your composer.json. The autoloading is registered programmatically and works on both Linux and Windows systems.

๐ŸŽฏ Quick Start

Create Your First Module

This command will create a complete module structure:

Create Components Within Modules

๐Ÿ“š Module Management

List All Modules

Output:

Enable/Disable Modules

Run Module Migrations

Run Module Seeders

๐Ÿ› ๏ธ Artisan Commands

Module Management Commands

Command Description
module:make {name} Create a new HMVC module scaffold
module:list List all registered HMVC modules
module:enable {name} Enable a disabled HMVC module
module:disable {name} Disable an HMVC module
module:migrate {name} Run database migrations for a specific module
module:seed {name} Run the database seeder for a specific module

Module Options

The module:make command supports several options:

Make Commands with Module Support

All Laravel make: commands support the --module option:

Basic Components

Database Components

Event System

Jobs & Queues

API & Resources

Notifications & Mail

Validation & Rules

Broadcasting

View Components

Other Components

Note: All commands work normally without --module option (standard Laravel behavior).

๐Ÿ“ Module Structure

A typical module structure looks like this (matching Laravel's standard structure):

โš™๏ธ Configuration

The configuration file is located at config/hmvc.php:

Customizing Module Directories

You can customize the directory structure in config/hmvc.php:

๐ŸŽ“ Advanced Usage

Module Service Providers

Each module can have its own service provider located at Providers/ServiceProvider.php:

Registering Class Aliases

The package provides two ways to register class aliases:

1. Using the Helper Function (Recommended):

Single alias:

Multiple aliases at once (snake_case):

Multiple aliases at once (camelCase):

Note: Both register_class_aliases() (snake_case) and registerClassAliases() (camelCase) are available. Use whichever naming convention you prefer.

2. Using the Trait:

Benefits:

Module Routes

Web Routes (routes/web.php)

API Routes (routes/api.php)

Module Views

Views are automatically registered with the module name as namespace:

Module Translations

Translation files are automatically loaded:

Module Migrations

Migrations are automatically discovered and can be run with:

Or run all migrations (including modules):

Module Configuration

Access module configuration:

๐Ÿ“ Examples

Example 1: Complete Blog Module

Example 2: API Module with Events

Example 3: E-commerce Module

๐Ÿ”ง Troubleshooting

Module Not Found

If you get "Module does not exist" error:

  1. Check module name (case-insensitive)
  2. Verify module exists in modules/ directory
  3. Run php artisan module:list to see all modules

Routes Not Loading

  1. Ensure module is enabled: php artisan module:enable ModuleName
  2. Check route files exist: modules/ModuleName/routes/web.php or api.php
  3. Clear route cache: php artisan route:clear

Views Not Found

  1. Verify view files exist in modules/ModuleName/Resources/views/
  2. Use correct namespace: module-name::view.name
  3. Clear view cache: php artisan view:clear

๐Ÿงช Testing

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please see CONTRIBUTING.md for more details.

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿ“ฆ Data Transfer Objects (DTOs)

The package includes a powerful DTO system with a base class for type-safe data transfer:

Creating DTOs

DTO Structure

All DTOs extend Rawnoq\HMVC\DTOs\BaseDto which provides:

Example DTO

Using DTOs

๐Ÿ™ Credits

๐Ÿ“š Additional Resources


Made with โค๏ธ for the Laravel community


All versions of laravel-hmvc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
illuminate/console Version ^11.0|^12.0
illuminate/filesystem Version ^11.0|^12.0
illuminate/routing Version ^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rawnoq/laravel-hmvc contains the following files

Loading the files please wait ...