catlane/laravel-model-page

v1.0 2023-08-02 08:54 UTC

This package is auto-updated.

Last update: 2024-12-01 00:09:48 UTC


README

使用方法

在Model中 use PageTraits 即可

<?php

namespace App\Models;
use Catlane\LaravelModelPage\Models\Traits\PageTraits;

class AddressModel extends Model
{
    use PageTraits;//
    protected $table = 'address';
}

返回参数

{
	"data": [{
		"id": 4,
		"uid": 1
	}],
	"total": 4,
	"page_total": 3,
	"now_page": "1",
	"limit": "3",
	"last_page": 2
}

参数注解