21 lines
555 B
PHP
21 lines
555 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
class Perkembangan extends Model
|
|
{
|
|
protected $table = 'perkembangan';
|
|
protected $fillable = ['tanggal', 'minggu_ke', 'pakan_pakai', 'pakan_sisa', 'bobot', 'afkir', 'kematian', 'id_kandang','created_at','created_at'];
|
|
public $timestamps = true;
|
|
|
|
public function kandang()
|
|
{
|
|
return $this->belongsTo(DataKandang::class, 'id_kandang');
|
|
}
|
|
public function bibit()
|
|
{
|
|
return $this->belongsTo(ManajemenBibitAyamMasuk::class, 'id_bibit');
|
|
}
|
|
}
|