33 lines
685 B
PHP
33 lines
685 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
class NewsArticle extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $table = 'news_articles';
|
|
use SoftDeletes;
|
|
protected $fillable=[
|
|
'id ',
|
|
'news_articles_category_xid',
|
|
'name',
|
|
'description',
|
|
'thumbnail_image',
|
|
'image',
|
|
'is_active',
|
|
'deleted_at',
|
|
'created_at',
|
|
'updated_at',
|
|
|
|
];
|
|
public function category()
|
|
{
|
|
return $this->belongsTo(NewsArticleCategory::class,'news_articles_category_xid','id');
|
|
}
|
|
}
|