<?php

namespace App;

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

class Artikel extends Model
{
    use HasFactory;

    protected $fillable = ['kategori_artikel','judul','konten','user_id'];

    public function katartikel()
    {
        return $this->belongsTo('App\Katartikel');
    }

    public function user()
    {
        return $this->belongsTo('App\User');
    }

    public function eoffice()
    {
        return $this->belongsTo('App\Eoffice');
    }

    public function laravel()
    {
        return $this->belongsTo('App\Laravel');
    }

    public function lihatlaravel()
    {
        $getLaravel = Laravel::all();
        return $laravel;
    }

   
}
