cosyphp/row-table

laravel-admin 扩展 row-table

1.1.0 2019-05-16 07:51 UTC

This package is auto-updated.

Last update: 2024-09-16 20:44:40 UTC


README

安装

运行

$ composer require cosyphp/row-table

然后运行

$ php artisan vendor:publish --tag=row-table

更新它

在执行 composer update 之后,如果此扩展的版本已更改

运行

php artisan vendor:publish --tag=row-table --force

这将覆盖 /public/vendor/laravel-admin-ext/row-table/ 下的 css 和 js 文件

或者你可以在 composer.json 中添加一个脚本

"scripts": {
    "post-update-cmd": "php artisan vendor:publish --tag=row-table --force",
}

使用方法

protected function form()
{
    $form = new Form();

    $tableRow = new TableRow();
    $tableRow->select('图表类型')->options(['按年显示', '按月显示', '按天显示'])->default(1);
    $tableRow->date('日期')->default(date('Y-m-d'));
    $tableRow->button('搜索')->attribute('id', 'search-btn')->setElementClass('btn-primary');

    $form->rowtable('搜索')->setRows($tableRow)->useDiv(true);
    $form->disableSubmit();
    $form->disableReset();

    return $form;
}

许可证

MIT 许可证 (MIT)下许可。