![]() 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/job-board.corals.io/Corals/modules/SMS/Traits/ |
<?php namespace Corals\Modules\SMS\Traits; use Corals\Modules\SMS\Models\Message; trait MessageableTrait { /** * @return mixed */ public function getPhoneNumber() { if (!is_null($phoneNumber = $this->phone_number)) { return $phoneNumber; } if (!is_null($phone = $this->phone)) { return $phone; } } /** * @return \Illuminate\Database\Eloquent\Relations\MorphMany */ public function messages() { return $this->morphMany(Message::class, 'messageable'); } /** * @return string|string[]|null */ public function routeNotificationForNexmo() { return $this->getPhoneNumber(); } /** * @return mixed */ public function routeNotificationForTwilio() { return $this->getPhoneNumber(); } /** * @return mixed */ abstract public function getSMSBodyParameters(): array; /** * @return mixed */ abstract public static function getSMSBodyDescriptions(): array; }