niaz/dbpanel
Composer 安装命令:
composer require niaz/dbpanel
包简介
developer panel for laravel application
README 文档
README
Introduction
dbpanel is a developer tool for laravel application. You can test your controller's action methods by calling its namepspace@method and save them for your future need. You can also run artisan command, namespace lookup for available methods and all their associated doc and parameters type.
📢 You can also access your laravel application's database easily and fastest way in a same panel. There are some cool filter available with this package. You might look around your table's column type and index also. You can also update and delete your filtered data.
📢 You can also open vue component in code editor (phpstorm,vscode) by clicking open file from vue chrome extention tool.
Installation 📡
composer require niaz/dbpanel --dev
Publish assets 🔌
php artisan vendor:publish --tag=dbpanel --force
SetUp Configuration 🚀
You need to edit config/dbpanel.php as your configuration
If your default code editor is phpstorm,then need to set as
'editor'=>'phpstorm' // default 'editor'=>'vscode'
If your application not used controller namespace property, then you need to set this value as
'controller' => '', // deafult 'controller' => 'App\\Http\\Controllers\\',
Usage 📦
Visit Route:
/dbpanel
To Check Controller or Model or Other Method
Just type your Controller or Model or any other class name and method as
ClassName@method
If you had a more namespace from Controller or Model default namespace prefix, then
ExtraNameSpace\ClassName@method
To pass parameter
App\User 5|string|58,hello,78|12:58:59
Note: parameters are separated by
|. Array parameter value are,seprated. Numeric string value will auto converted asinttype value. This was also applicable for array.
To pass request instance
prop.width.px@45
prop.height.px@45
filter.date.start@2020-11-12
filter.date.end@2020-15-12
filter.search@lorem ipsum
filter.range.min@15
filter.range.max@68
filter.time@12:58:56
every formData are in a new line
or Raw json
{
"husky": {
"hooks": {
"pre-commit": "npm test",
"pre-push": "npm test",
"...": "..."
}
}
}
Return
It will return a json with log and data . In log all database query,bindings and time are listed.If this method return any data,it will return with data.
Tip: you can test your request data from other tab by passing
request@dd,parametersandrequest
To pass auth for login with ID
5@id,name,email
id_number@id,column_name,email
Run Artisan Command
Database
Select a table name from table option and enter some query string with some key name are filter name as follows:
id (key)
Example: &id=5 &id=5-100
sort (key)
Example: &sort=email:asc &sort=name:desc &sort=desc
is (key)
Example: &is=active:0 &is=active:1 &is=date:2020-04-29
date (key)
single date
Example: &date=updated_at:2020-04-29
range of date
Example: &date=created_at:2020-04-19:2020-04-21
lookup (key)
for variant,
- use
!for not match - use
$to specify string postion - use
,for and condition - use
|for or condition
Example:
&lookup=email:start$ &lookup=email:$end &lookup=email:$anywhere$ &lookup=email:!$.com
where (key)
for variant,
- use
!for not equal - use
<for less than - use
>for greater than - use
,for and condition - use
|for or condition
Example:
&where=product_price:500&where=discount:<20&where=product_id:<200,product_price:>500&where=product_price:<300|discount:>15
join (key)
Example:
&join=initialTable:Column:firstTable:Column
initialColumn=firstColumn and firstColumn=secondColumn
&join=initialTable:Column:firstTable:Column,firstable:Column:secondTable:Column:
Note: when use join Not to use any similar
columnname related filter it will thrown error.
return_only (key)
for alias use @
Example:
&return_only=id,name,email&return_only=name,email,phone&return_only=id,name@user_name,email@user_email&return_only=name@employee_name,phone@employee_phone&return_only=users.name@employee_name,address,website
return_except (key)
Example:
&return_except=id,name,email&return_except=name,email,phone
Delete
To delete your filtered data just pass &delete
Update
Example : &update=column_name:value,column_name:value
Lisence
niaz/dbpanel 适用场景与选型建议
niaz/dbpanel 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 2.98k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2020 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 niaz/dbpanel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 niaz/dbpanel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.98k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-18