Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Modules Laravel Package

zingle-com/laravel-modules

View on GitHub
Deep Wiki
Context7

Laravel Modules

Build Status Coverage Status

Simple helpers for adding modular architecture to your Laravel project.

Overview

Modular architecture makes your application easier to understand and scale. This package attempts to add support for modules with minimal effort and greatest amount of flexibility. A Module in this package corresponds with a module grouping of code in your project.

Installation

Install the base package with composer.

$ composer install zingle-com/laravel-modules

Add service provider to your providers after the Illuminate providers, but before your project service providers.

// config.php
// ...
	'providers' => [
		// ...
		Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Notifications\NotificationServiceProvider::class,

        /**
         * Vendors
         */
    	// ...
    	ZingleCom\LaravelModules\ModuleServiceProvider::class,

    	// ...
    	/**
    	 * Project providers
    	 */
	],

Finally install the vendor assets:

$ php artisan vendor:publish --provider="ZingleCom\LaravelModules\ModuleServiceProvider::class"

Usage

After defining your modular structure, to create a new module simply create add a new class that extends Module to your base module directory that corresponds with the name of the module. For example, if you had a module named Auth the base directory for which is app/Modules/Auth you would create the following class:

namespace App\Modules\Auth;

use ZingleCom\LaravelModules\Module\Module;

class AuthModule extends Module
{

}

Then add the new module class to config/modules.php under the modules key like:

// modules.php
// ..
	"modules" => [
		App\Modules\Auth\AuthModule::class,
	],
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle