开始官网模板

This commit is contained in:
augushong
2020-04-19 13:18:57 +08:00
parent 1ec8c07250
commit 9910dd3e6d
42 changed files with 1435 additions and 219 deletions

View File

@@ -1,5 +1,6 @@
<?php
declare (strict_types = 1);
declare(strict_types=1);
namespace app\model;
@@ -10,5 +11,14 @@ use think\Model;
*/
class PostCategory extends Model
{
//
//
public function post()
{
return $this->belongsTo(Post::class, 'post_id');
}
public function category()
{
return $this->belongsTo(Category::class,'category_id');
}
}