Zaed_Abdullah/irrigation-report-api/app/Models/Content/Article.php
2024-12-31 11:48:55 +07:00

31 lines
595 B
PHP

<?php
namespace App\Models\Content;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
use HasFactory;
protected $table = 'content.article';
protected $keyType = 'string';
public $incrementing = true;
protected $fillable = [
'title',
'desc',
'image',
'location',
'author',
'tags',
'created_at',
'updated_at',
];
public function article_photo()
{
return $this->hasMany(ArticlePhoto::class, 'article_id');
}
}