Download the PHP package laravelmodules/core without Composer
On this page you can find all versions of the php package laravelmodules/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravelmodules/core
More information about laravelmodules/core
Files in laravelmodules/core
Informations about the package core
LaravelModules
- Upgrade Guide
- Installation
- Configuration
- Naming Convension
- Folder Structure
- Creating Module
- Artisan Commands
- Routes
- Helpers
- Facades
- Entity
- Auto Scan Vendor Directory
- Publishing Modules
This is a laravel project for large laravel apps using modules inspired in:
rappasoft/laravel-5-boilerplate
nwidart/laravel-modules
amamarul/boiler-plate-commands
LaravelModules by default has a "Core Module" to manage Modules and the following Modules:
- Base Module
- Users Module
- Menu Module
Upgrade Guide
Installation
Quick
To install through composer, simply run the following command:
Add Service Provider
Next add the following service provider in config/app.php
.
Next, add the following aliases to aliases
array in the same file.
Next publish the package's configuration file by running :
Next run in console:
Autoloading
By default controllers, entities or repositories are not loaded automatically. You can autoload your modules using psr-4
. For example :
Configuration
modules
- Used for save the generated modules.assets
- Used for save the modules's assets from each modules.migration
- Used for save the modules's migrations if you publish the modules's migrations.generator
- Used for generate modules folders.scan
- Used for allow to scan other folders.enabled
- Iftrue
, the package will scan other paths. By default the value isfalse
paths
- The list of path which can scanned automatically by the package.composer
vendor
- Composer vendor name.author.name
- Composer author name.author.email
- Composer author email.cache
enabled
- Iftrue
, the scanned modules (all modules) will cached automatically. By default the value isfalse
key
- The name of cache.lifetime
- Lifetime of cache.
Creating A Module
To create a new module you can simply run :
<module-name>
- Required. The name of module will be created.
Create a new module
Create multiple modules
When the Module was created you can chose is you would like to generate ".gitkeep" files on empty folders
- If you choose "yes", you can remove them later running
module:gitkeep:remove <MODULE NAME>
. - If you choose "no", you can generate them later running
module:gitkeep <MODULE NAME>
.
By default if you create a new module, that will add some resources like controller, seed class or provider automatically. If you don't want these, you can add --plain
flag, to generate a plain module.
Import a new module from GitHub
Run in console
Example
Because we are autoloading the modules using psr-4
, we strongly recommend using StudlyCase
convension.
Artisan Commands
Create new module.
Use the specified module.
Show all modules in command line.
Create new command for the specified module.
Create new migration for the specified module.
Rollback, Reset and Refresh The Modules Migrations.
Rollback, Reset and Refresh The Migrations for the specified module.
Create new seed for the specified module.
Migrate from the specified module.
Migrate from all modules.
Seed from the specified module.
Seed from all modules.
Create new controller for the specified module.
Publish assets from the specified module to public directory.
Publish assets from all modules to public directory.
Create new model for the specified module.
Create new service provider for the specified module.
Publish migration for the specified module or for all modules.
This helpful when you want to rollback the migrations. You can also run php artisan migrate
instead of php artisan module:migrate
command for migrate the migrations.
For the specified module.
For all modules.
Publish Module configuration files
- (optional)
module-name
: The name of the module to publish configuration. Leaving blank will publish all modules. - (optional)
--force
: To force the publishing, overwriting already published files
Enable the specified module.
Disable the specified module.
Generate new middleware class.
Generate new mailable class.
Generate new notification class.
Update dependencies for the specified module.
Update dependencies for all modules.
Show the list of modules.
Generate .gitkeep
files in empty folders.
Remove .gitkeep
files in module folders.
Routes
Show the list of modules routes.
- Show routes of an spacific module
As the regular php artisan route:list
you can use the others option filters
- The options available are:
- host (--host="")
- module (--module="")
- method (--method="")
- uri (--uri="")
- name (--name="")
- action (--action="")
- middleware (--middleware="")
Helpers
Config
Get Generic module configs.
For example if you have a module with the name "Example"
Get Specific module configs.
Facades
Get all modules.
Get all cached modules.
Get ordered modules. The modules will be ordered by the priority
key in module.json
file.
Get scanned modules.
Find a specific module.
Find a module, if there is one, return the Module
instance, otherwise throw Amamarul\Modules\Exeptions\ModuleNotFoundException
.
Get scanned paths.
Get all modules as a collection instance.
Get modules by the status. 1 for active and 0 for inactive.
Check the specified module. If it exists, will return true
, otherwise false
.
Get all enabled modules.
Get all disabled modules.
Get count of all modules.
Get module path.
Register the modules.
Boot all available modules.
Get all enabled modules as collection instance.
Get module path from the specified module.
Get assets path from the specified module.
Get config value from this package.
Get used storage path.
Get used module for cli session.
Set used module for cli session.
Get modules's assets path.
Get asset url from specific module.
Install the specified module by given module name.
Update dependencies for the specified module.
Add a macro to the module repository.
Call a macro from the module repository.
Get all required modules of a module
Module Entity
Get an entity from a specific module.
Get module name.
Get module name in lowercase.
Get module name in studlycase.
Get module path.
Get extra path.
Disable the specified module.
Enable the specified module.
Delete the specified module.
Get an array of module requirements. Note: these should be aliases of the module.
Custom Namespaces
When you create a new module it also registers new custom namespace for Lang
, View
and Config
. For example, if you create a new module named blog, it will also register new namespace/hint blog for that module. Then, you can use that namespace for calling Lang
, View
or Config
. Following are some examples of its usage:
Calling Lang:
Calling View:
Calling Config:
Publishing Modules
Have you created a laravel modules? Yes, I've. Then, I want to publish my modules. Where do I publish it? That's the question. What's the answer ? The answer is Packagist.
Auto Scan Vendor Directory
By default the vendor
directory is not scanned automatically, you need to update the configuration file to allow that. Set scan.enabled
value to true
. For example :
You can verify the module has been installed using module:list
command:
Publishing Modules
Two ways
-
Console Way
- Verify available Modules in LaravelModules list You can contribute to an existant Module to make improvements
- Prepare for Github
Push to Github
- Manual Way After creating a module and you are sure your module module will be used by other developers. You can push your module to github or bitbucket and after that you can submit your module to the packagist website.
You can follow this step to publish your module.
- Create A Module.
- Push the module to github.
- Submit your module to the packagist website. Submit to packagist is very easy, just give your github repository, click submit and you done.
Credits
- Maru Amallo - amamarul
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of core with dependencies
arcanedev/log-viewer Version ~4.0
arcanedev/no-captcha Version ~3.0
creativeorange/gravatar Version ~1.0
davejamesmiller/laravel-breadcrumbs Version ^3.0
laravel/framework Version 5.4.*
laravel/socialite Version ^3.0
laravel/tinker Version ~1.0
laravelcollective/html Version 5.4.*
yajra/laravel-datatables-buttons Version ^1.1
yajra/laravel-datatables-oracle Version ^7.0
barryvdh/laravel-debugbar Version ^2.1
amamarul/integer-hashids Version ^1.0