QappSendOrder.php 636 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Modules\SendOrder\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class QappSendOrder extends Model
  5. {
  6. protected $table = 'qapp_send_orders';
  7. protected $fillable = [
  8. 'send_order_id',
  9. 'account',
  10. 'channel_user_id',
  11. 'distribution_channel_id',
  12. ];
  13. /**
  14. * @param $sendOrderId
  15. * @return array
  16. */
  17. public static function getSendOrderById($sendOrderId)
  18. {
  19. if (empty($sendOrderId)) {
  20. return [];
  21. }
  22. $result = self::where('send_order_id', $sendOrderId)->first();
  23. return $result ? $result->toArray() : [];
  24. }
  25. }