-
-
Notifications
You must be signed in to change notification settings - Fork 93
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 BlogYou 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=BlogCreate a DataTables class, For more information Click the link beside. DataTables Documentation
php artisan module:make-datatable PostDatatables --module=BlogIn 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=Blogphp artisan module:make-controller ArticleController --module=Blogphp artisan module:make-cast BlogCast --module=Blogphp artisan module:make-channel BlogChannel --module=BlogFor 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=Blogphp artisan module:make-event BlogEvent --module=Blogphp artisan module:make-exception BlogException --module=Blogphp artisan module:make-factory BlogFactory --module=Blogphp artisan module:make-job BlogJob --module=Blogphp artisan module:make-listener BlogListener --module=Blogphp artisan module:make-mail BlogMail --module=Blogphp artisan module:make-middleware BlogMiddleware --module=Blogphp artisan module:make-migration BlogMigration --module=Blogphp artisan module:make-notification BlogNotification --module=Blogphp artisan module:make-observer BlogObserver --module=Blogphp artisan module:make-policy BlogPolicy --module=Blogphp artisan module:make-provider BlogProvider --module=Blogphp artisan module:make-request BlogRequest --module=Blogphp artisan module:make-resource BlogResource --module=Blogphp artisan module:make-rule BlogRule --module=Blogphp artisan module:make-scope BlogScope --module=BlogFor more information click the link beside. Component Documentation
php artisan module:make-search ArticleSearch --module=Blogphp artisan module:make-seeder BlogSeeder --module=BlogSeed the given module, or without an argument, seed all modules
php artisan module:seed BlogFor more information click the link beside. Publish Documentation
php artisan ladmin:publish BlogYou 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=BlogExample of options on controller class creation
php artisan module:make-controller PostController --invokable --module=BlogAnd 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