baldcat/platform-per-page 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

baldcat/platform-per-page

最新稳定版本:0.3.0

Composer 安装命令:

composer require baldcat/platform-per-page

包简介

Adds functionality for selecting the number of records in tables for the Orchid Platform.

README 文档

README

Installation

To install the package, run the following command:

composer require baldcat/platform-per-page

Usage

Connecting the Functionality to the Table

To add the ability to select a number of records to a table, override the $template property as shown below:

<?php

namespace App\Orchid\Layouts;

use Orchid\Screen\Layouts\Table;
use Orchid\Screen\TD;

class ExampleTable extends Table
{
    protected $target = 'tests';

    protected $template = 'platform-pp::layouts.table';
    
    protected function columns(): iterable
    {
        return [
            TD::make('id', 'ID'),
        ];
    }
}

You can use the ppp macros for the query builder to specify the number of records in the query method:

    public function query(): iterable
    {
        return [
            'tests' => Test::ppp(),
        ];
    }

Configuration

The configuration file contains two options:

<?php

return [
    /**
     * Pagination Options
     *
     * Specifies the available items per page for pagination.
     * Example values:
     * - 10: 10 items per page
     * - 25: 25 items per page
     * - 50: 50 items per page
     */
    'options' => [10, 25, 50],

    /**
     * Pagination Label
     *
     * The label displayed next to the pagination control.
     * Example: "Items Per Page".
     */
    'label' => 'Per Page',
];

To modify these options, publish the configuration file using the command:

php artisan vendor:publish --provider="Baldcat\PlatformPerPage\PlatformPerPageServiceProvider" --tag="config"

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固