QuickAppSendOrder.php 647 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Modules\SendOrder\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class QuickAppSendOrder extends Model
  5. {
  6. protected $table = 'quickapp_send_orders';
  7. protected $fillable = [
  8. 'send_order_id',
  9. 'child_send_order_id',
  10. 'child_gzh_nickname',
  11. 'child_gzh_name',
  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('id', $sendOrderId)->first();
  23. return $result ? $result->toArray() : [];
  24. }
  25. }