阶段性更新

This commit is contained in:
2021-02-03 17:24:51 +08:00
parent 77d0d9ae92
commit b408cf278b
20 changed files with 888 additions and 539 deletions

View File

@@ -10,6 +10,16 @@ class Article extends Model
use HasOneCover, BelongsToCategory;
const POSITION_A = 1;
const POSITION_B = 2;
const POSITION_C = 3;
const POSITIONS = [
self::POSITION_A => '院所新闻',
self::POSITION_B => '科学研究',
self::POSITION_C => '科技成果',
];
public function getLinkAttribute()
{
return route('article.show', $this);

View File

@@ -2,10 +2,12 @@
namespace App\Models;
use App\Models\Traits\BelongsToCategory;
use App\Models\Traits\HasOneCover;
class Talent extends Model
{
use HasOneCover;
use HasOneCover,
BelongsToCategory;
}