belongsTo(User::class); } public function business() { return $this->belongsTo(Business::class); } public function smsgateway() { return $this->belongsTo(Smsgateway::class, 'smsgateway_id'); } /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ 'user_id' => 'integer', 'device_id' => 'integer', 'business_id' => 'integer', 'send_attempts' => 'integer', ]; protected $imageFields = ['attachment']; }