first push
This commit is contained in:
22
app/Models/Model.php
Normal file
22
app/Models/Model.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use DateTimeInterface;
|
||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||
|
||||
class Model extends Eloquent
|
||||
{
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* 为数组 / JSON 序列化准备日期。
|
||||
*
|
||||
* @param \DateTimeInterface $date
|
||||
* @return string
|
||||
*/
|
||||
protected function serializeDate(DateTimeInterface $date)
|
||||
{
|
||||
return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user