-
Notifications
You must be signed in to change notification settings - Fork 91
Module
This package is inspired by nwidart/laravel-modules with slight modifications to suit hexters/ladmin
Create new module and select preset Laravel Blade
option.
php artisan module:make Blog
You can directly access the admin page via the link below.
http://localhost:8000/administrator/blog
Open route Modules/Blog/routes/web.php
file, protect route based on Menu gate
so that it cannot be accessed directly without the permissions Role
The namespace doesn't use App\
anymore but instead becomes Modules\
, see example below.
namespace Modules\Blog;
app/
bootstrap/
config/
Modules/
|--- Ladmin/
|--- Blog /
|--- config/
|--- module.php
|--- Console/
|--- Commands/
|--- Databases/
|--- Seeders/
|--- DatabaseSeeder.php
|--- Exceptions/
|--- Http/
|--- Controllers/
|--- Controller.php
|--- Middleware/
|--- lang/
|--- en/
|--- Models/
|--- Providers/
|--- BlogServiceProvider.php
|--- EventServiceProvider.php
|--- RouteServiceProvider.php
|--- Resources/
|--- css/
|--- app.css
|--- js/
|--- app.js
|--- views/
|--- routes/
|--- api.php
|--- web.php
|--- app.json
|--- package.json
After the module is created, you need to create a menu and register it in the sidebar menu.
To create a menu class, click the link beside to see how to register the menu . Menu Documentation
php artisan module:make-menu PostMenu --module=Blog
Create a DataTables class, For more information Click the link beside. DataTables Documentation
php artisan module:make-datatable PostDatatables --module=Blog
In addition to the commands above, there are several commands that can be used to help you complete your Laravel project.
php artisan module:make-model Article --module=Blog
php artisan module:make-controller ArticleController --module=Blog
php artisan module:make-cast BlogCast --module=Blog
php artisan module:make-channel BlogChannel --module=Blog
For more information click the link beside. Command Documentation
php artisan module:make-command BlogCommand --module=Blog
For more information click the link beside. Component Documentation
php artisan module:make-component BlogComponent --module=Blog
php artisan module:make-event BlogEvent --module=Blog
php artisan module:make-exception BlogException --module=Blog
php artisan module:make-factory BlogFactory --module=Blog
php artisan module:make-job BlogJob --module=Blog
php artisan module:make-listener BlogListener --module=Blog
php artisan module:make-mail BlogMail --module=Blog
php artisan module:make-middleware BlogMiddleware --module=Blog
php artisan module:make-migration BlogMigration --module=Blog
php artisan module:make-notification BlogNotification --module=Blog
php artisan module:make-observer BlogObserver --module=Blog
php artisan module:make-policy BlogPolicy --module=Blog
php artisan module:make-provider BlogProvider --module=Blog
php artisan module:make-request BlogRequest --module=Blog
php artisan module:make-resource BlogResource --module=Blog
php artisan module:make-rule BlogRule --module=Blog
php artisan module:make-scope BlogScope --module=Blog
For more information click the link beside. Component Documentation
php artisan module:make-search ArticleSearch --module=Blog
php artisan module:make-seeder BlogSeeder --module=Blog
Seed the given module, or without an argument, seed all modules
php artisan module:seed Blog
For more information click the link beside. Publish Documentation
php artisan ladmin:publish Blog
You can also use options like those in laravel, for example.
Example of options on class model generation
php artisan module:make-model Article -m --module=Blog
Example of options on controller class creation
php artisan module:make-controller PostController --invokable --module=Blog
And there are many other options.
- #1 Create Module
- #2 Create Menu
- #3 Route
- #4 Create DataTables
- #5 Template Layout
- #6 Create Model
- #7 Create Command
- #8 Create Component
- #9 Broadcast Notification
- #10 Group Search
- #11 Flashing Message
- #12 Compiling Assets (ViteJs)
- #13 Ladmin Option
- #14 Utility & Helpers
- #15 Vendor Publish
- #16 Custom Style
- #17 Ladmin Awesome
- #18 Make Money