Download the PHP package mycmdev/nova-modules without Composer
On this page you can find all versions of the php package mycmdev/nova-modules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package nova-modules
Nova Modules v1.3.0 by CmDevelopment
A Laravel Nova Tool helping modularize your application. Often happens that our applications grow a lot and we need a lot of models, resources, lenses, actions, migrations etc.. With this package we can divide our nova parts in little chunks (or modules).
Let's start
To start you just need to install the composer package
In our composer.json we have to add
"nova-modules" and "NovaModules" are the default folder and default namespace for the package, but you can change it publishing the config file with the command:
and changing it on:
now we just need to type the command:
and our module will be autocreated with all his subfolders.
Directory Structure
So we'll have a structure like this :
- NovaModules
- TestModule
- Actions
- Assets
- js
- Fields
- Filters
- Cards
- ResourceTools
- Tools
- sass
- views
- js
- Cards
- Dashboards
- Database
- migrations
- seeds
- Fields
- Filters
- Lenses
- Metrics
- Models
- Providers
- Resources
- ResourcesTools
- Routes
- Tools
Commands
NovaModules has an artisan command for almost everything we need:
For creating new action
For creating new card
note: it will create a folder in our assets with the Vue file so we can integrate it in our main JS file
For creating new custom filter
note: this one as well will create a folder in our assets with the Vue file
For creating new dasboard
For creating a new Field
note: this one will create the 3 different Vue files for each view in our nova application.
For creating a new filter
For creating a new lens
For creating a migration
For creating a new model
For creating a new partition metric
If we need to integrate another service provider in our module
note: you need to register it in your main module service provider.
For creating a new resource
note: resources are all auto loaded in your main application and they are grouped by default with the name of your module.
For creating a new resource-tool
note: this will create as weel Vue file inside your assets folder.
For creating a new tool connected with your module
note: this will create Vue file inside your assets folder as well a navigation.blade inside the Assets/views folder .
I don't know if maybe in a future release i will add a system for autoloading
For creating a new trend metric
For creating a new value metric
For creating a new policy
Thanks
I would like to thank @nWidart for giving me the idea about modular laravel application with his great package nwidart/laravel-modules
License
The MIT License (MIT). Please see License File for more information.