<?php

namespace App\Models\Webprofile;

use App\Http\Traits\UuidTrait;
use App\Models\Webprofile\En\Categories as EnCategories;
use Illuminate\Database\Eloquent\Model;

class Categories extends Model
{
    use UuidTrait;

    public $incrementing = false;
    protected $table = 'swp_categories';

    protected $guarded = [];

    public function berita()
    {
        return $this->hasMany(Posts::class, 'id', 'categories');
    }

    public function rEn()
    {
        return $this->hasOne(EnCategories::class, 'category_id', 'id');
    }
}
