adrema/app/Member/Membership.php

28 lines
594 B
PHP
Raw Normal View History

2021-06-24 23:48:08 +02:00
<?php
namespace App\Member;
2021-08-22 22:23:17 +02:00
use App\Activity;
use App\Subactivity;
2021-06-24 23:48:08 +02:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
2021-08-22 22:23:17 +02:00
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2021-06-24 23:48:08 +02:00
class Membership extends Model
{
use HasFactory;
2022-01-03 10:33:48 +01:00
public $fillable = ['subactivity_id', 'activity_id', 'group_id', 'member_id', 'nami_id', 'from'];
2021-08-22 22:23:17 +02:00
public function activity(): BelongsTo
{
return $this->belongsTo(Activity::class);
}
public function subactivity(): BelongsTo
{
return $this->belongsTo(Subactivity::class);
}
2021-06-24 23:48:08 +02:00
}