2021-04-02 19:48:41 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
|
|
|
|
|
class NexusModel extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
2021-04-27 02:44:44 +08:00
|
|
|
// protected $perPage = 2;
|
2021-04-25 02:12:14 +08:00
|
|
|
|
2021-04-17 19:01:33 +08:00
|
|
|
/**
|
|
|
|
|
* 为数组 / JSON 序列化准备日期。
|
|
|
|
|
*
|
|
|
|
|
* @param \DateTimeInterface $date
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
protected function serializeDate(\DateTimeInterface $date)
|
|
|
|
|
{
|
|
|
|
|
return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
|
|
|
|
|
}
|
2021-04-02 19:48:41 +08:00
|
|
|
|
|
|
|
|
}
|