Download the PHP package saeedvir/laravel-modular without Composer

On this page you can find all versions of the php package saeedvir/laravel-modular. 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-modular

Laravel Modular

Latest Version on Packagist Total Downloads License

A powerful modular architecture package for Laravel applications that allows you to organize your codebase into independent, reusable modules with automatic discovery and zero configuration.

✨ Features

📋 Requirements

📦 Installation

Install the package via composer:

The package will automatically register itself via Laravel's package auto-discovery.

Configure composer merge plugin in your root composer.json:

Publish the configuration file (optional):

📖 For detailed installation instructions, troubleshooting, and setup guide, see:
Installation Guide

🚀 Quick Start

Create Your First Module

This creates a complete module structure:

Check Module Status

Remove a Module

📖 Usage

Creating Controllers

Creating Models

This creates a model in modules/Blog/app/Models/Post.php and optionally generates the associated migration, factory, and seeder.

Alternatively, you can create models manually:

Adding Routes

In modules/Blog/routes/web.php:

Note: All routes are automatically prefixed with the module name (/blog/ in this case). See Routing Guide for details.

Using Views

Create views in modules/Blog/resources/views/ and load them:

Migrations

Create migrations in your module:

Run migrations:

Testing

Generate a test for your module:

Run tests for a specific module or all modules:

🎯 Advanced Features

Module Configuration

Each module can have its own configuration file in config/config.php:

Access module config:

Register Livewire Components in Module Service Providers

usage :

Disabling Modules

You can easily enable or disable modules using Artisan commands. These states are automatically persisted in modules/modules.json.

Alternatively, you can manually list modules to be disabled in config/module.php:

Note: The persistent state in modules.json takes precedence over the config/module.php's disabled array.

Performance Optimization

The package includes built-in caching:

Debug Mode

When APP_DEBUG=true, the package logs:

When APP_DEBUG=false (production), only errors are logged.

🛠️ Available Commands

Command Description
module:make Create a new module
module:list List all modules
module:remove Remove a module
module:make-controller Create a controller in a module
module:make-model Create a model in a module
module:make-test Create a test class in a module
module:make-request Create a form request in a module
module:make-resource Create an API resource in a module
module:make-migration Create a migration in a module
module:make-factory Create a model factory in a module
module:make-seeder Create a database seeder in a module
module:enable Enable a specific module
module:disable Disable a specific module
module:status Show status of all modules
module:test Run tests for a specific module
module:cache Manage module discovery cache
module:optimize Optimize module discovery for production

⚙️ Configuration

The config/module.php file provides extensive configuration options:

📚 Documentation

🆚 Comparison with nWidart/laravel-modules

Both packages provide modular architecture for Laravel, but with different approaches:

Laravel Modular (This Package)

Philosophy: Zero-configuration with native Composer integration

Advantages:

Best For:

nWidart/laravel-modules

Philosophy: Feature-rich with extensive abstisan commands

Advantages:

Best For:

Feature Comparison

Feature Laravel Modular nWidart/laravel-modules
Autoloading Composer merge plugin Custom autoloader
Setup Complexity Minimal Moderate
Module Discovery Automatic Manual registration
Performance Optimized with caching Standard
Composer Integration Native Custom
Debug Logging Environment-aware Standard
Learning Curve Low (standard Laravel) Moderate
Module Structure Laravel conventions Custom structure
Asset Management Standard Laravel Built-in system
CLI Commands 17 essential commands 40+ commands
Community Growing Established
Package Size Lightweight Full-featured

When to Choose Laravel Modular

Choose this package if you:

When to Choose nWidart/laravel-modules

Choose nWidart if you:

Migration from nWidart

Migrating is straightforward:

  1. Module structure is similar (both use MVC)
  2. Routes and views work the same way
  3. Main difference is autoloading (Composer vs custom)
  4. Our Installation Guide covers setup

Both packages are excellent choices - pick based on your project's needs! 🎯

🧪 Testing

🤝 Contributing

Please see CONTRIBUTING for details on how to contribute to this project.

📝 Changelog

Please see CHANGELOG for more information on what has changed recently.

🔒 Security

If you discover any security-related issues, please email [email protected] instead of using the issue tracker.

👥 Credits

📄 License

The MIT License (MIT). Please see License File for more information.

💡 Examples

Blog Module Example

🌟 Why Laravel Modular?

📊 Performance


Built with ❤️ for the Laravel community

If you find this package helpful, please consider giving it a ⭐ on GitHub!


All versions of laravel-modular with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0|^12.0
wikimedia/composer-merge-plugin Version ^2.1
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 saeedvir/laravel-modular contains the following files

Loading the files please wait ...