simedkom/app/Models/ContentRecap.php
myuqinurrohman 0994e1717a chore: change show content recap UI
chore: change show content recap classification UI

feat: add grouping by classification
2025-04-17 14:43:27 +07:00

34 lines
702 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ContentRecap extends Model
{
use SoftDeletes;
protected $table = 'content_recaps';
protected $fillable = [
'content_theme',
'posted_date',
'channel',
'link',
'classification_id',
'social_media',
'image',
'description',
'enhancer_id',
];
public function enhancer()
{
return $this->belongsTo(User::class, 'enhancer_id', 'id');
}
public function classification(){
return $this->belongsTo(ContentRecapClassification::class, 'classification_id', 'id');
}
}