'datetime', ]; public function account() { if ($this->item_type === 'App\Profile') { return AccountService::get($this->item_id, true); } } public function profile() { return $this->belongsTo(Profile::class, 'item_id'); } }