定制 aaronneondigital/livewire-tables 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aaronneondigital/livewire-tables

最新稳定版本:1.2.0

Composer 安装命令:

composer require aaronneondigital/livewire-tables

包简介

Simple livewire tables

README 文档

README

livewire: "2.0^" php: "8.0^"

livewire-tables

You can install livewire tables using:

composer require aaronneondigital/livewire-tables

Examples

Firstly you must create a livewire component and extend the Table class

<?php

namespace App\Http\Livewire\Tables;

use AaronNeonDigital\LivewireTables\Tables\Columns\Column;
use AaronNeonDigital\LivewireTables\Tables\Table;
use App\Models\User;
use Illuminate\Database\Eloquent\Builder;

class CrimesTable extends Table
{
    public function query() : Builder
    {
        return User::query();
    }

    public function columns() : array
    {
        return [
            Column::make('created_at', 'Date'),
        ];
    }
}

The query and columns are required. The Column class is chainable. You can use sortable() to allow that row to be sortable. format(string) is used to format date, it accepts a string of a date format.

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-26