Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

mrfaisalrizal/modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clone from Caffeinated Modules

Tokolabs Modules

Latest Version Software License Total Downloads

Tokolabs Modules is a simple package to allow the means to separate your Lumen 5.6 application out into modules. Each module is completely self-contained allowing the ability to simply drop a module in for use.

The package follows the FIG standards PSR-1, PSR-2, and PSR-4 to ensure a high level of interoperability between shared PHP code.

Documentation

You will find user friendly and updated documentation in the wiki here: Caffeinated Modules Wiki

Quick Installation

Begin by installing the package through Composer.

composer require faisalrizal/modules

Once this operation is complete, simply add both the service provider and facade classes to your project's bootstrap/app.php file:

For Laravel

Service Provider

Add the following service provider in config/app.php.

'providers' => [
  Tokolabs\Modules\ModulesServiceProvider::class,
],

Next, add the following aliases to aliases array in the same file.

'aliases' => [
  'Module' => Tokolabs\Modules\Facades\Module::class,
],

Next publish the package's configuration file by run :

php artisan vendor:publish

For Lumen

Service Provider

$app->register(Tokolabs\Modules\ModulesServiceProvider::class);

Facade

$app->withFacades(true, [Tokolabs\Modules\Facades\Module::class => 'Module']);

And that's it! With your coffee in reach, start building out some awesome modules!

Add Module

$app->register(App\Modules\[ModuleName]\Providers\ModuleServiceProvider::class);

About

Modules package for the Laravel & Lumen framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published