Add (post manage)
Add (post country viewing)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user