No Description

KeepData.php 565B

12345678910111213141516171819202122
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class KeepData extends Model
  5. {
  6. protected $table = "keep_data";
  7. public $timestamps = false;
  8. public static function lists($page,$pagesize){
  9. $count = KeepData::count();
  10. $list = KeepData::limit($pagesize)->offset( ($page-1)*$pagesize)->get()->toArray();
  11. $returndata['list']=$list;
  12. $returndata['page']['count']=$count;
  13. $returndata['page']['page']=$page;
  14. $returndata['page']['pagesize']=$pagesize;
  15. return $returndata;
  16. }
  17. }