20 lines
425 B
PHP
20 lines
425 B
PHP
<?php
|
|
|
|
namespace app\model;
|
|
|
|
class Reading extends Base
|
|
{
|
|
protected $autoWriteTimestamp = false;
|
|
|
|
public static function getPageList($name = '')
|
|
{
|
|
return self::when(!empty($name), function($query) use($name){
|
|
$query->where('name', 'like', "%$name%");
|
|
})
|
|
->order('id desc')
|
|
->paginate([
|
|
'list_rows'=> 20,
|
|
'var_page' => 'page',
|
|
]);
|
|
}
|
|
} |