12345678910111213141516171819202122 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class KeepData extends Model
- {
- protected $table = "keep_data";
- public $timestamps = false;
-
- public static function lists($page,$pagesize){
- $count = KeepData::count();
- $list = KeepData::limit($pagesize)->offset( ($page-1)*$pagesize)->get()->toArray();
- $returndata['list']=$list;
- $returndata['page']['count']=$count;
- $returndata['page']['page']=$page;
- $returndata['page']['pagesize']=$pagesize;
- return $returndata;
- }
- }
|