Add (article): ai gen, front views

This commit is contained in:
2023-09-24 22:53:40 +08:00
parent 18705bd5e4
commit 322d680961
115 changed files with 9710 additions and 201 deletions

View File

@@ -0,0 +1,46 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class PostCategory
*
* @property int $id
* @property int $post_id
* @property int $category_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
* @property Post $post
* @property Category $category
*/
class PostCategory extends Model
{
protected $table = 'post_categories';
protected $casts = [
'post_id' => 'int',
'category_id' => 'int',
];
protected $fillable = [
'post_id',
'category_id',
];
public function post()
{
return $this->belongsTo(Post::class);
}
public function category()
{
return $this->belongsTo(Category::class);
}
}