Add new features for Admin
Step 1: Copy any module in the ZiAdmin folder, then follow the same module.
Step 2: Create route in file base/ZiAdmin/routes.php
----
The structure of a module includes
ModuleA -> views (stores blade files)
ModuleA -> Controller files.
The organization of blade files inside with the Controller makes it easier and more convenient to fix bugs, develop, and search...saving a lot of time for development and maintenance
Admin Module Struct:
└── ZiAdmin
│ ├── ModuleNameFolder/
│ │ └── views - .blade file
│ │ └── All php file (Controller)
│ ├── ModuleExample/
│ │ └── views - .blade file
│ │ │ └── input.blade.php - form edit/add item
│ │ │ └── list.blade.php - Table list items
│ │ └── ExampleView.php - View controller for input, list
│ │ └── ExampleAction.php - Action controller for save, delete....
Admin Route Struct:
Route::group(
[
'middleware' => [ 'web', 'system4admin', 'backend', '2fa' ],
'prefix' => config('zi.website.backend_route_prefix'),
], function () {
#region Example
Route::group([ 'prefix' => 'example' ], function () {
Route::get('/{function?}', [ ExampleView::class, 'index' ])->name("private.example");
Route::match([ 'delete', 'post' ], '/{function?}', [ ExampleAction::class, 'index' ])->name("private.example.action");
});
#endregion Example
});
Or you can also develop the way you are usually doing with laravel.