ivanaquino / jet-admin
Jetstream livewire 管理员
0.1.3
2024-08-18 19:19 UTC
Requires
- php: ^8.1
- blade-ui-kit/blade-heroicons: ^2.3
- blade-ui-kit/blade-icons: ^1.6
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.5
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
此包为使用 Laravel Jetstream 和 Livewire 的应用程序提供优雅且响应式的管理面板和着陆页布局。它提供了一种快速简单的方法来构建应用程序的管理界面和着陆页,节省您在开发初期的时间和精力。
库
安装
注意:Flowbite 包不再需要。
你是视觉学习者吗?查看我们的 YouTube 视频 https://youtu.be/yPIGqrF1GAM
您可以通过 composer 安装此包
composer require ivanaquino/jet-admin
将暗色模式添加到您的 tailwind config 文件 tailwind.config.js
。
{ darkMode: 'class', ... }
更改主色调很简单,您只需修改 tailwind 配置文件 tailwind.config.js
。
{ theme: { extend: { // ... colors: { 'primary': { '50': '#eaf5ff', '100': '#d9ecff', '200': '#badbff', '300': '#91c1ff', '400': '#659bff', '500': '#4273ff', '600': '#2149ff', '700': '#183bec', '800': '#1533be', '900': '#1b3494', '950': '#101d56', }, }, }, }, }
发布 jet-admin JavaScript
php artisan vendor:publish --tag="jet-admin-js"
现在将 jet-admin JS 添加到 ./resources/js/app.js
import './vendor/jet_admin';
要更改导航项,您必须发布配置文件
php artisan vendor:publish --tag="jet-admin-config"
这是已发布配置文件的内容
return [ /* |-------------------------------------------------------------------------- | Landing Navigation |-------------------------------------------------------------------------- | | name: Could be a string or a translation key this will be passed through the __() function | route: Could be a url or a route name | |*/ 'landing_navigation' => [ [ 'name' => 'Home', 'route' => '/', ], ], /* |-------------------------------------------------------------------------- | Dashboard Navigation |-------------------------------------------------------------------------- | | Items in this array will be used to generate the dashboard sidebar | - name: The label that will be displayed in the sidebar | - route: Could be a route name or a URL | - active_route: The route name or URL that will be used to determine if the item is active | - icon: The icon that will be displayed in the sidebar, Heroicons' name. | |*/ 'dashboard_navigation' => [ [ 'name' => 'Dashboard', 'route' => 'dashboard', 'active_route' => 'dashboard*', 'icon' => 'home', ], [ 'name' => 'Profile', 'route' => 'profile.show', 'active_route' => 'profile.show', 'icon' => 'user', ], // [ // 'name' => 'Url example', // 'route' => 'my-url', // 'active_route' => 'my-url', // 'icon' => 'shield-exclamation', // ], ], ];
可选地,您可以使用以下方式发布视图
php artisan vendor:publish --tag="jet-admin-views"
用法
着陆布局
<x-jet-admin::landing-layout> Your own content goes here... </x-jet-admin::landing-layout>
仪表盘布局
<x-jet-admin::dashboard-layout> Your dashboard content goes here... </x-jet-admin::dashboard-layout> {{-- OR --}} <x-jet-admin::second-dashboard-layout> Your dashboard content goes here... </x-jet-admin::second-dashboard-layout>
测试
composer test
更新日志
请参阅 更新日志 了解最近更改的详细信息。
贡献
请参阅 贡献指南 了解详细信息。
安全漏洞
请查阅 我们的安全策略 了解如何报告安全漏洞。
致谢
许可
MIT 许可证 (MIT)。请参阅 许可文件 了解更多信息。