/home/mip/mip/app/Modules/Likod/Models/Clients/Client.php
<?php
namespace QxCMS\Modules\Likod\Models\Clients;
use Illuminate\Database\Eloquent\Model;
class Client extends Model
{
protected $connection = 'qxcms';
protected $table = "clients";
public $module_id = 5;
protected $fillable = [
'client_name',
'client_address',
'telephone_no',
'email',
'client_address',
'database_name',
'database_host',
'database_username',
'database_password',
'api_key',
'api_secret',
'status',
'number_of_users',
'disk_size',
'date_picker_format',
'display_date_format',
'name_format',
'monthly_mail_quota',
'root_dir',
'mail_driver',
'mail_sender_address',
'mail_sender_name',
'mail_host',
'mail_username',
'mail_password',
'mail_port',
'storage_type',
's3_key',
's3_secret',
's3_region',
's3_bucket_name',
'cpanel_email',
'cpanel_host',
'cpanel_ip',
'cpanel_port',
'cpanel_account',
'cpanel_password',
'cpanel_domain',
'cpanel_user_default_password',
'cpanel_qouta',
'cpanel_forwarder'
];
protected $appends = ['hashid', 'date_picker', 'date_picker_display'];
/*
* Model Accessors
*/
public function getHashidAttribute()
{
return hashid($this->id);
}
public function getDatePickerAttribute()
{
return config('account.dateformat.'.$this->date_picker_format);
}
public function getDatePickerDisplayAttribute()
{
return config('account.displaydateformat.'.$this->display_date_format);
}
/*
* Model Mutators
*/
/*
* Model Relationship
*/
public function users()
{
return $this->hasMany('QxCMS\Modules\Likod\Models\Clients\User', 'client_id');
}
}