shrft/laravel-admin-bar
Composer 安装命令:
composer require shrft/laravel-admin-bar
包简介
Add admin toolbar to the front side of your website.
关键字:
README 文档
README
This package help you add Wordpress like admin bar to your Laravel application. Admin bar is an easy-to-access toolbar to your admin pages.
Supported Version
- laravel/framework >= 5.5
Installation
To instal laravel-admin-bar, require it by Composer:
composer require shrft/laravel-admin-bar
Once Composer is done, run the following command:
php artisan vendor:publish --provider="Shrft\AdminBar\AdminBarServiceProvider"
If you visit your page, you already have Admin bar!
Basic Usage
You can configure how and when admin bar should be shown via the configuration file called adminbar.php.
If you have already run the publish command above, you should already have this file under the config directory.
The following is the default setup of the adminbar.php
You can learn how to configure Admin Bar from the doc blocks of this file.
return array( /** * * Change this to false to disable admin bar * * */ 'enabled'=>true, /** * * Please specify your admin pages' url so that Admin Bar does not show up in * your admin pages. * * The default is 'admin/*' * The pass is checked with Illuminate\Http\Request::is(). * * */ 'excludes' => 'admin/*', /** * * In order to show Admin Bar only for logged in admin users, * please specify how to tell if current visitor is logged in and also an admin * user. * * As a default, we just return true. * * */ 'is_admin' => function(){ // This is an example code. // // if( Auth::user() && Auth::user()->isAdmin()){ // return true; // } // return false; return true; }, /** * * Specify links to show on Admin Bar. * * */ 'menus' => array( ['title'=>'Admin Top', 'path'=>'/admin'], ['title'=>'Add a post', 'path'=>'/admin/post/new'], // you can pass callback to the path ['title'=>'Edit a post', 'path'=>function($request){ // this is an example of how you generate pass dynamically. if($request->is('post/*')){ $postid = $request->route('id'); return '/admin/post/edit/' . $postid; } // if you return false, this link is not displayed. return false; }], // pass an array to path for dropdown menu. ['title'=>'Drop Down', 'path'=>[ ['title'=>'Option1', 'path'=>'/path/to/option1'], ['title'=>'Option2', 'path'=>'/path/to/option2'] ] ], ), );
Lincense
Laravel Admin Bar is open-sourced software licensed under the MIT license.
shrft/laravel-admin-bar 适用场景与选型建议
shrft/laravel-admin-bar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 227 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 02 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「admin」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 shrft/laravel-admin-bar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 shrft/laravel-admin-bar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 shrft/laravel-admin-bar 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
Alfabank REST API integration
Smile Retailer Admin
统计信息
- 总下载量: 227
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-01
