xsoft / adminpanel
Admin Panel
Requires
Requires (Dev)
This package is auto-updated.
Last update: 2025-03-15 22:35:00 UTC
README
Package for fast and easy admin panels creation!
Init
Add
Schema::defaultStringLength(191);
In your Providers/AppServiceProvider.php
And use command
php artisan admin:start --install
Warning!
Using this command can break your routes and views, so use it only on project Init!
After add add
mix.sass('resources/sass/AdminPanel/main.scss', 'public/vendor/admin-panel/css/adminPanel.css');
In your webpack.mix.js and run
npm run dev
Usage
Menu
Class Xsoft\AdminPanel\Menu
helps you with building your app menu.
By default, menu instance used in app is created in App\Http\Controllers\Controller
.
Usage:
$menu = Menu::make(
['label', 'route_name', 'icon_css_class'],
['parent_label', 'parent_route_name', 'parent_icon_css_class',
['child_label', 'child_route_name', 'child_icon_css_class'],
...
],
...
);
Menu element _routename and _icon_cssclass can be empty.
Breadcrumb
Usage:
In view , just use:
{!! Breadcrumb::make(['label','route_name'],['label']) !!}
Elements without _routename will not be clickable.
LFM tag
In blade views:
@lfm('name','buttonLabel',['imageOneUrl','imageTwoUrl',...])
DeleteButton tag
In blade views:
@deleteButton('route')