mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 12:34:01 +00:00
28 lines
526 B
PHP
28 lines
526 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Remark extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'remarks';
|
|
|
|
public function owner(): morphTo
|
|
{
|
|
return $this->morphTo();
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function commenter(): BelongsTo
|
|
{
|
|
return $this->BelongsTo(User::class, 'commenter_id', 'id');
|
|
}
|
|
}
|