<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class comment extends Model
{
    protected $table = "comments";
    protected $fillable = ['blog_id', 'name', 'comment', 'created_at', 'updated_at'];
    protected $hidden = ['created_at', 'updated_at'];

    public function blogs()  /** علاقة التعليق بالبوست الواحد **/
    {
        return $this->belongsTo('App\Models\blog', 'blog_id');
    }
}
