You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
723 B
32 lines
723 B
5 years ago
|
<?php
|
||
|
namespace App;
|
||
|
|
||
|
use Illuminate\Database\Eloquent\Model;
|
||
|
use App\Appended\Traites\GetDateAttributesPersianTrait;
|
||
|
|
||
|
class SmsPanel extends Model {
|
||
|
|
||
|
use GetDateAttributesPersianTrait;
|
||
|
|
||
|
protected $fillable = ['user_id','business_id','content','quantity','cell_number', 'type'];
|
||
|
|
||
|
public $timestamps = false;
|
||
|
|
||
|
public function user()
|
||
|
{
|
||
|
return $this->belongsTo('App\User');
|
||
|
}
|
||
|
|
||
|
public function business()
|
||
|
{
|
||
|
return $this->belongsTo('App\Business');
|
||
|
}
|
||
|
|
||
|
public function getTypeFaAttribute()
|
||
|
{
|
||
|
$type = config('WM-Conf.SMSPanelType');
|
||
|
return isset($type[$this->attributes['type']]) ? $type[$this->attributes['type']] : 'دیگر';
|
||
|
}
|
||
|
|
||
|
}
|