Download the PHP package codeurx/modular without Composer
On this page you can find all versions of the php package codeurx/modular. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codeurx/modular
More information about codeurx/modular
Files in codeurx/modular
Package modular
Short Description Codeurx Modular is simply a package for Laravel to help you create and manage modules.
License MIT
Informations about the package modular
Codeurx Modular
Codeurx Modular is simply a package for Laravel to help you create and manage modules.
Install
To install through Composer, by run the following command:
Autoloading
By default the module classes are not loaded automatically. You can autoload your modules using psr-4
. For example:
Tip: don't forget to run composer dump-autoload
afterwards.
run the following command to publish modules
table migrations:
after that run the command:
Usage
Creating A Module
To create a new module, simply run the following command:
<module-name>
- Replace with the name of the desired module.
Folder Structure
You can access the url example for Users module by typing :
For Dummy data:
Deleting A Module
To delete a specific module, simply run the following command:
<module-name>
- Replace with the name of the desired module to be deleted.
Tip: if the module does not exist you will be asked if you want to create it.
Listing All the Modules
To list the modules just run the following command:
Creating A Module Migration
To create a migration for a specific module just run the following command:
<module-name>
- Replace with the name of the desired module.<table-name>
- optional field, replace it with a disired name of table.
if you don't give the option --table the table name will take the name of the module by default.
Migrating Database for all modules
Migrating Database for specific module
Creating a new Controller for specific module
<module-name>
- Replace with the name of the desired module.<controller-name>
- Replace with the controller name.
For example :
or
Tip: if you typed the second command the folder structure will be like below :
And for the routes you should add a line like this :
Creating a new model for specific module
<module-name>
- Replace with the name of the desired module.<model-name>
- Replace with the model name.
For example :
or
Tip: if you typed the second command the folder structure will be like below :
Credits
About Amir Ali Salah
I'm a Tunisian FullStack Web Developer. For the moment i work for GIS (Gate Informatic Systems), you can visit My Website for more Informations.
License
The MIT License (MIT). Please see License File for more information.