二次改版
This commit is contained in:
28
app/Models/Leader.php
Normal file
28
app/Models/Leader.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Traits\BelongsToCategory;
|
||||
use App\Models\Traits\HasCovers;
|
||||
use App\Models\Traits\HasSort;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Leader extends Model
|
||||
{
|
||||
use BelongsToCategory,
|
||||
HasCovers,
|
||||
HasSort;
|
||||
|
||||
const STATUS_FALSE = 0;
|
||||
const STATUS_TRUE = 1;
|
||||
|
||||
const STATUS = [
|
||||
self::STATUS_FALSE => '关闭',
|
||||
self::STATUS_TRUE => '开启',
|
||||
];
|
||||
|
||||
public function getLinkAttribute()
|
||||
{
|
||||
return route('leader.show', $this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user