underwear/laravel-vue-good-table
Composer 安装命令:
composer require underwear/laravel-vue-good-table
包简介
Vue-good-table wrapper for Laravel. Server side tables without pain.
README 文档
README
Customizable table tool for Laravel, uses powerful vue-good-table. Server side tables without pain.
Supports pagination, filtering, searching, sorting. Inspired by Laravel Nova :)
Reqs
- Laravel 5.6+ or Laravel 6, Laravel 7, Laravel 8, Laravel 9
- Using Vue.js in your project
Usage example
- Use
InteractsWithVueGoodTabletrait in your controller and implement two methods:getColumns()andgetQuery(). - Register two new routes.
- Use Vue component
laravel-vue-good-tablewherever you want.
Controller:
namespace App\Http\Controllers; use LaravelVueGoodTable\InteractsWithVueGoodTable; use LaravelVueGoodTable\Columns\Column; use LaravelVueGoodTable\Columns\Date; use Illuminate\Http\Request; use App\User; class TestController extends Controller { use InteractsWithVueGoodTable; /** * Get the query builder * * @param Request $request * * @return Illuminate\Database\Eloquent\Builder */ protected function getQuery(Request $request) { return User::query(); } /** * Get the columns displayed in the table * * @return array */ protected function getColumns(): array { return [ Text::make('ID', 'id') ->sortable() ->searchable(), Text::make('Name', 'name') ->searchable(), Text::make('E-mail', 'email') ->searchable(), Date::make('Created At', 'created_at') ->sortable() ->dateOutputFormat('dd.MM.yyyy HH:mm:ss'), ]; } }
Routes:
Route::get('/lvgt/config', 'TestController@handleConfigRequest'); Route::get('/lvgt/data', 'TestController@handleDataRequest');
Blade/HTML:
<div id="vue"> <laravel-vue-good-table data-url="/lvgt/data" config-url="/lvgt/config"/> </div>
Installation
composer require underwear/laravel-vue-good-table
See the full Installation Guide in DOCUMENTATION.md
Documentation
See DOCUMENTATION.md
Contributing
Contributions are welcome!
Credits
License
The MIT License (MIT). Please see License File for more information.
underwear/laravel-vue-good-table 适用场景与选型建议
underwear/laravel-vue-good-table 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.73k 次下载、GitHub Stars 达 40, 最近一次更新时间为 2020 年 06 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 underwear/laravel-vue-good-table 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 underwear/laravel-vue-good-table 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 40
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-25