123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class OcrLog extends Model
- {
- protected $table = 'ocr_log';
- protected $primaryKey = 'id';
- // protected function serializeDate(\DateTimeImmutable $date)
- // {
- // return $date->format('Y-m-d H:i:s');
- // }
- const CREATED_AT = 'creation_date';
- public static function getList(int $page,int $limit)
- {
- $offset = ($page - 1) * $limit;
- $query = OcrLog::query()->offset($offset)->limit($limit)->get();
- if ($query){
- return $query->toArray();
- }else{
- return [];
- }
- }
- public static function insertData(array $data)
- {
- return OcrLog::query()->insert($data);
- }
- }
|