mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-05 03:58:39 +00:00
25 lines
411 B
PHP
25 lines
411 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* 文章.
|
|
*/
|
|
class Article extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'article';
|
|
protected $dates = ['deleted_at'];
|
|
protected $guarded = [];
|
|
|
|
// 筛选类型
|
|
public function scopeType($query, $type)
|
|
{
|
|
return $query->whereType($type);
|
|
}
|
|
}
|