26 lines
646 B
PHP
26 lines
646 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
class ManajemenBibitAyamMasuk extends Model
|
|
{
|
|
protected $table = 'manajemen_bibit_ayam_masuk';
|
|
protected $fillable = ['tanggal', 'jumlah_bibit', 'id_kandang','created_at','created_at','status'];
|
|
public $timestamps = true;
|
|
|
|
public function kandang()
|
|
{
|
|
return $this->belongsTo(DataKandang::class, 'id_kandang');
|
|
}
|
|
public function perkembangan()
|
|
{
|
|
return $this->hasMany(Perkembangan::class, 'id_bibit', 'id');
|
|
}
|
|
public function panen()
|
|
{
|
|
return $this->hasMany(HasilPanen::class, 'id_bibit', 'id');
|
|
}
|
|
|
|
}
|