32 lines
583 B
PHP
32 lines
583 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use EloquentFilter\Filterable;
|
|
|
|
class Article extends Model
|
|
{
|
|
use HasFactory;
|
|
use Filterable;
|
|
|
|
protected function serializeDate(\DateTimeInterface $date)
|
|
{
|
|
return $date->format('Y-m-d H:i:s');
|
|
}
|
|
|
|
protected $fillable = [
|
|
'title',
|
|
'content',
|
|
'cover',
|
|
'category',
|
|
't_ids',
|
|
'published_at',
|
|
'is_enable',
|
|
'is_recommend',
|
|
'sort',
|
|
'appendixes',
|
|
];
|
|
}
|