link2zain / webmagic_dashboard
Package for base dashboard preparing
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:CSS
Requires
- php: 7.1 - 7.3
- ext-json: *
- graham-campbell/markdown: 10 - 12.0
- laravel/framework: 5.5 - 7
- link2zain/webmagic_core: ^1.0 || master
- ocramius/package-versions: 1.4 - 1.5
Requires (Dev)
- phpunit/phpunit: 6.0 - 9.0
This package is auto-updated.
Last update: 2025-03-05 21:18:58 UTC
README
This module may be used for build dashboard based on any stiles. In current realization we will use AdmiLTE template but maybe in future core functionality will move to separate project
Description
The main idea of this module is to give the possibility to generate the dashboard pages from PHP with Laravel power. At the same time, to give the possibility to flexibly configure, expand and modify the generation process.
Getting started
Pages fast building description
Forms and form elements
Additional features
- Select2 response converter - convert array to Select2 format
Dashboard
Dashboard it's just class which creating BasePage with settings and call method render. But this class is singleton that's mean once you set up class then you will get the same class in any part of your app. More about singleton for example here : http://dron.by/post/pattern-proektirovaniya-singleton-odinochka-na-php.html Dashboard can get the same with BasePage.
Route::get('dashboard', function () { return app(\Webmagic\Dashboard\Dashboard::class); });
Define logo
Work with main menu
Work with navbar menu
NavBar menu extends MainMenu so the functionality and ability the same as Main menu
Front
Building setting up with gulp and webpack, all commands you can run with gulp. In building setup two environments 'dev' and 'prod'
'dev' environment - run building front into root public directory 'prod' environment - run building front into module public directory
for set/change environment run in console command:
set NODE_ENV=prod/dev
- for Windows
export NODE_ENV=prod/dev
- for Linux
Updating assets after module updated
For update assets after module updated you can use console command:
php artisan dashboard::assets-update
This command will removed your current assets and copied new assets for package. Destination path you can change with param --path. As default it is public_path('webmagic/dashboard')
Using local version of dashboard inside other project
Set volumes into your docker-compose.yml
volumes:
...
- "../packages:/srv/packages"
Add it to composer.json of your app
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/",
"Webmagic\\Dashboard\\":"/srv/packages/dashboard/"
}
},