Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
<?php
namespace App\Models;
use App\Models\Locations\Location;
use App\Models\Post;
use App\Traits\LocationTrait;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Meeting extends Model
{
use HasFactory, SoftDeletes;
use LocationTrait;
protected $fillable = ['post_id', 'venue', 'address', 'price', 'based_on_quantity', 'transaction_type_id', 'meetingable_id', 'meetingable_type', 'status', 'from', 'till'];
/**
* Get related post for this event
* Ont-to-one relationship
* @return void
*/
public function post()
{
return $this->belongsTo(Post::class);
}
/**
* Get the organizer of the meeting (i.e. user or organization).
*
* @return void
*/
public function meetingable()
{
return $this->morphTo();
}
/**
* Get the organizer of the meeting (i.e. user or organization).
* Accessor and alias of meetingable.
*
* @return void
*/
public function getOrganizerAttribute()
{
return $this->meetingable;
}
public function location()
{
return $this->morphOne(Location::class, 'locatable');
}
/**
* Get the transaction type for this meeting
*/
public function transactionType()
{
return $this->belongsTo(\App\Models\TransactionType::class, 'transaction_type_id');
}
}