42 lines
		
	
	
		
			790 B
		
	
	
	
		
			PHP
		
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			790 B
		
	
	
	
		
			PHP
		
	
	
| <?php
 | |
| 
 | |
| namespace App\Models;
 | |
| 
 | |
| use Illuminate\Database\Eloquent\Factories\HasFactory;
 | |
| use Illuminate\Database\Eloquent\Model;
 | |
| 
 | |
| class HasilUjiLP extends Model
 | |
| {
 | |
|     use HasFactory;
 | |
| 
 | |
|     protected $table = 'HasilUjiLP';
 | |
| 
 | |
|     protected $primaryKey = 'HasilUjiLPId';
 | |
| 
 | |
|     protected $fillable = [
 | |
|         'PelaporanId',
 | |
|         'Tahun',
 | |
|         'PerusahaanId',
 | |
|         'Sampah',
 | |
|         'Jenis',
 | |
|         'Bulan',
 | |
|         'Nilai',
 | |
|     ];
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model Pelaporan.
 | |
|      */
 | |
|     public function pelaporan()
 | |
|     {
 | |
|         return $this->belongsTo(Pelaporan::class, 'PelaporanId', 'PelaporanId');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Relasi ke model Perusahaan.
 | |
|      */
 | |
|     public function perusahaan()
 | |
|     {
 | |
|         return $this->belongsTo(Perusahaan::class, 'PerusahaanId', 'PerusahaanId');
 | |
|     }
 | |
| }
 |