mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-12 23:48:53 +00:00
28 lines
484 B
PHP
28 lines
484 B
PHP
<?php
|
|
|
|
namespace App\Http\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* 文章
|
|
* Class Article
|
|
*
|
|
* @package App\Http\Models
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Article extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'article';
|
|
protected $primaryKey = 'id';
|
|
protected $dates = ['deleted_at'];
|
|
|
|
// 筛选类型
|
|
function scopeType($query, $type)
|
|
{
|
|
return $query->where('type', $type);
|
|
}
|
|
} |