1
0

提交代码

This commit is contained in:
2020-08-06 14:45:56 +08:00
commit 9d0d5f4be9
361 changed files with 36445 additions and 0 deletions

18
app/Models/Article.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace App\Models;
class Article extends Model
{
public function category()
{
return $this->belongsTo(Category::class);
}
public function getCoverPathAttribute()
{
return $this->cover ? env('APP_URL') . '/storage/' . $this->cover : '/assets/index/img/newImg_00_active.png';
}
}