mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-19 20:44:01 +00:00
41 lines
736 B
PHP
41 lines
736 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
use App\Classes\General\Interfaces\Notifiable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Spatie\Activitylog\Traits\LogsActivity;
|
|
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
|
|
|
class AbstractModel extends Model implements Notifiable
|
|
{
|
|
use LogsActivity;
|
|
protected static $logFillable = true;
|
|
|
|
/**
|
|
* @return MorphTo
|
|
*/
|
|
public function subject(): MorphTo
|
|
{
|
|
return $this->MorphTo('subject');
|
|
}
|
|
|
|
/**
|
|
* @return MorphTo
|
|
*/
|
|
public function target(): MorphTo
|
|
{
|
|
return $this->MorphTo('target');
|
|
}
|
|
|
|
/**
|
|
* @return MorphTo
|
|
*/
|
|
public function causer(): MorphTo
|
|
{
|
|
return $this->MorphTo('causer');
|
|
}
|
|
|
|
|
|
} |