Add (post manage)

Add (post country viewing)
This commit is contained in:
2023-07-28 02:29:11 +08:00
parent e70195f4f7
commit ded1643e5f
49 changed files with 4484 additions and 3844 deletions

View File

@@ -11,39 +11,36 @@
/**
* Class PostCategory
*
*
* @property int $id
* @property int $post_id
* @property int $category_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property Category $category
* @property Post $post
*
* @package App\Models
*/
class PostCategory extends Model
{
protected $table = 'post_categories';
protected $table = 'post_categories';
protected $casts = [
'post_id' => 'int',
'category_id' => 'int'
];
protected $casts = [
'post_id' => 'int',
'category_id' => 'int',
];
protected $fillable = [
'post_id',
'category_id'
];
protected $fillable = [
'post_id',
'category_id',
];
public function category()
{
return $this->belongsTo(Category::class);
}
public function category()
{
return $this->belongsTo(Category::class);
}
public function post()
{
return $this->belongsTo(Post::class);
}
public function post()
{
return $this->belongsTo(Post::class);
}
}