34 lines
721 B
PHP
34 lines
721 B
PHP
<?php
|
|
|
|
namespace App\Models\Pertanian;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
use App\Models\Pertanian\Petani;
|
|
|
|
class SurveyPelatihan extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $table = 'survey_pelatihan';
|
|
|
|
protected $fillable = [
|
|
'uid',
|
|
'petani_id',
|
|
'jenis_pelatihan',
|
|
'penyelenggara',
|
|
'tahun_pelaksanaan',
|
|
'created_by',
|
|
'updated_by',
|
|
'deleted_by',
|
|
];
|
|
|
|
public function petani(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Petani::class, 'petani_id');
|
|
}
|
|
}
|