Update workshop
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Program;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Program\Workshop;
|
||||
use App\Models\Program\PesertaWorkshop;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
class SesiWorkshop extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $table = 'sesi_workshop';
|
||||
|
||||
protected $fillable = [
|
||||
'workshop_id',
|
||||
'judul',
|
||||
'deskripsi',
|
||||
'tanggal_awal',
|
||||
'tanggal_akhir',
|
||||
'status',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
public function workshop()
|
||||
{
|
||||
return $this->belongsTo(Workshop::class, 'workshop_id');
|
||||
}
|
||||
|
||||
public function pesertaWorkshop()
|
||||
{
|
||||
return $this->hasMany(PesertaWorkshop::class, 'sesi_workshop_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user