Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
L

Laravel modular (Support )

Installation Instructions

Laravel Modular helps to make your application modular. Often happens that our applications grow a lot and we need a lot of models, resources, controllers, migrations etc.. With this package we can divide our parts in little chunks (or modules).

Loading modules using PSR-4 standard automatically

Install

To install through Composer, by run the following command:

composer require idel/laravel-modular

The package will automatically register a service provider and alias.

Optionally, publish the package's configuration file by running:

php artisan vendor:publish --provider="Idel\Modular\ServiceProvider"

How to modularize Laravel Nova

If you have installed the Laravel Nova package, by referring to the config/laravel-modules.php file and changing supportLaravelNova to true, your modular system will be able to support Laravel Nova.


// Path : config/laravel-modules.php

"supportLaravelNova" => true,

After that

We put the following code in the desired module's ServiceProvider.php

Parameters

Name Type Rules Default
hasResources boolean required true
hasCards boolean optional false
hasDashboards boolean optional false
hasTools boolean optional false
hasJs boolean optional false
hasCss boolean optional false
assetDir string optional ''

assetDir example : 'site' or 'panel' or 'storage' css, js files folder


    /**
     * Bootstrap the module services.
     *
     * @return void
     */
    public function boot()
    {
        $this->bootLaravelNova($hasResources,$hasCards,$hasDashboards,$hasTools,$hasJs,$hasCss,$assetDir);
    }

boot laravel nova

Readme

Laravel-Modular

Laravel Modular helps to make your application modular. Often happens that our applications grow a lot and we need a lot of models, resources, controllers, migrations etc.. With this package we can divide our parts in little chunks (or modules).

** Loading modules using PSR-4 standard automatically **

Install

To install through Composer, by run the following command:

composer require idel/laravel-modular

The package will automatically register a service provider and alias.

Optionally, publish the package's configuration file by running:

php artisan vendor:publish --provider="Idel\Modular\ServiceProvider"

Pages Link

Generators

Actions

Nova Generators

Documentation

You'll find installation instructions and full documentation on https://idel327.github.io/laravel-modular.

Directory Structure

Using Artisan commands, files and folders are created according to your needs.

So we'll have a structure like this :

  • modules
    • routes
    • database
      • migrations
    • languages
    • resources
      • js
      • views
    • src
      • Providers
      • Entities
      • Http
        • Controllers
        • Middleware
        • Requests
      • Exceptions
      • Jobs
      • Mails
      • Casts
      • Observers
      • Facades
      • Traits
      • Events
      • Listeners
      • Tests
      • Console

Default structure with files :

  • modules
    • src
      • Providers
        • ServiceProvider.php
    • info.json

To Do

  • Update Document.
  • Add Test Files.
  • Improving Performance.
  • Cache System.
  • Public Folder Support In Each Module.

Contact us

oeslami32@gmail.com

omeslami32@gmail.com

idel327327@gmail.com

Screenshots

Reviews

By KhodeMamalizz on August 24, 2022

Very Useful, Thanks...

By Mahdi Jahandide on August 22, 2022

Awesome! very useful package

By kamimehrabi on August 16, 2022

nice structure

Back to Top
Added 3 years ago
Last updated 2 Years Ago
Version v1.1.9
Composer
idel/laravel-modular
GitHub stars 15
Packagist downloads 45

Favorites

2 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
3 ratings

Author

Contributors

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas