<?php namespace App; use Illuminate\Database\Eloquent\Model; class Monitoring extends Model { protected $guarded = ['id','created_at','updated_at']; public function programming() { return $this->belongsTo(Programming::class)->with('automaticprocess'); } public function stateprogramming() { return $this->belongsTo(Stateprogramming::class); } }