Contact Us
ScaleupAlly ScaleupAlly
  • Services
    • Column 1
      • Technology Services
        • Software Development
        • Web App Development
        • Mobile App Development
        • Product Ideation and Design
    • Column 2
      • Data Services
        • Data Engineering
        • Data Visualization & Consulting
        • Data Analytics
    • Column 3
      • New Age Services
        • Agentic AI
        • Generative AI
        • Integration Services
        • Top 1% Talent
        • Offshore Development Centre
  • Industries
    • Column 1
      • Business Type
        • Startup Corner
        • SME Accelerator
    • Column 2
      • Industries
        • BFSI
        • Education
        • Ecommerce
        • Generative AI
        • Industrial Operations & Logistics
        • ITES
        • Marketplace
        • Travel
        • Restaurant
        • Saas
    • Column 3
      • Assessment
      • Founder’s
        Personality Quiz

        Take the Quiz
  • Technologies
    • Column 1
      • Backend Technologies
        • Node.js
        • Python
        • PHP
        • .Net
        • Java
        • Laravel
    • Column 2
      • Frontend Technologies
        • ReactJS
        • NextJS
        • AngularJS
        • JavaScript
      • Mobile App Technologies
        • React Native
        • Flutter
        • iOS
        • Android
    • Column 3
      • Data Analytics
        • Power BI
        • Tableau
      • DevOps
        • Azure
        • AWS
    • Column 4
      • Tools
        • n8n
        • Power Apps
        • Stripe
        • Make.com
        • QuickBooks
        • Bullhorn
        • Apache Airflow
        • Power Automate
        • Clearent
  • Resources
    • Blog
      • IT Services
      • Payment Gateways
      • System Integration
      • Business Intelligence
      • Data Engineering
      • Software Development
      • Agentic AI
      • Life at ScaleupAlly
    • ScaleupAlly Quiz
      • Founder Personality Assessment
      • Technical Knowledge Assessment
      • Founder Self-Assessment
    • Guides
      • Software ROI Boost Checklist
      • Power BI Performance Checklist
      • AI Timeline for Procurement
      • Power Apps Checklist
      • CTO Unpacks Gen AI Costs
      • Outsourcing Checklist
      • Power BI Vendor Checklist
    • Project Cost Calculator
      • Generative AI
      • Software Development
      • App Development
      • Product Design & Ideation
      • Data Engineering & ETL
      • Data Analytics & Visualization
      • Integration Services
      • Top 1% Tech Talent
      • Offshore Development Center
  • Case Studies
  • About Us
Book A Demo
Contact Us
ScaleupAlly
Contact Us

Code Snippets

Home / Payment Gateways / Code Snippets
Home > Blog > Payment Gateways

Code Snippets

webadmin   |   February 13, 2026 , 7 min read

Table Of Content


curl -s "https://laravel.build/laravel-elasticsearch" | bash
cd laravel-elasticsearch
./vendor/bin/sail up


elasticsearch:
  image: docker.elastic.co/elasticsearch/elasticsearch:8.7.0
  environment:
    - discovery.type=single-node
    - xpack.security.enabled=false
  ports:
    - "9200:9200"

# Then restart Sail:
./vendor/bin/sail down
./vendor/bin/sail up -d


./vendor/bin/sail composer require elasticsearch/elasticsearch


<?php

use Elasticsearch\ClientBuilder;

class ElasticsearchService
{
    protected $client;

    public function __construct()
    {
        $this->client = ClientBuilder::create()
            ->setHosts(['elasticsearch:9200'])
            ->build();
    }

    public function index(string $index, array $body)
    {
        return $this->client->index([
            'index' => $index,
            'body'  => $body,
        ]);
    }

    public function search(string $index, array $query)
    {
        return $this->client->search([
            'index' => $index,
            'body'  => $query,
        ]);
    }

    public function bulk(array $params)
    {
        return $this->client->bulk($params);
    }
}


PS C:\Users\pc> php artisan make:observer ProductObserver --model=Product


use App\Models\Product;
use App\Observers\ProductObserver;

public function boot()
{
    Product::observe(ProductObserver::class);
}


$es = app(ElasticsearchService::class);
$es->index('products', [
    'id' => 1,
    'name' => 'Blue Sneakers',
    'price' => 89.99
]);


$query = [
    'query' => [
        'match' => [
            'name' => 'sneakers'
        ]
    ]
];

$results = $es->search('products', $query);

Dark Blue Gradient Background

Related Blogs

blog-image
Payment Gateways

15 Best Payment Gateways in the UAE in 2025 [Latest Updated]

Discover the top 15 payment gateway options in the UAE, including features, and pricing plans for businesses seeking secure online transactions.

Suprabhat Sen
Nov 25 , 13 min read

blog-image
Payment Gateways

Top 13 Mobile Payment Gateway Solutions [2025]

Discover the top 13 mobile payment gateways, with key features, pros, cons, and integration tips to help you choose the best solution for your app.

Suprabhat Sen
Nov 8 , 18 min read

blog-image
Payment Gateways

10 Best Ecommerce Payment Gateways in UAE

Explore the best ecommerce payment gateways in UAE. Compare providers, costs, compliance, and features to choose the right solution for your business.

Suprabhat Sen
Sep 30 , 13 min read

Group 35
Clutch_bg_less
goodfirms_bg_less
refren
Clutch_bg_less
goodfirms_bg_less
refren

UAE

Building A1, IFZA Business Park, DDP, Dubai, UAE

Australia

Unit 1, 105 Denham St Allenstown QLD 4700, Australia

India

H134, First Floor, Sector 63, Noida 201301, India

About

  • About Us
  • Why Scaleupally
  • Culture of ScaleupAlly
  • Current Job Openings
  • ScaleupAlly Yearbooks
  • ScaleupAlly FAQs

Services

  • Generative AI
  • Mobile App Development
  • Custom Software Development
  • Data Analytics
  • Staff Augmentation
  • Other Services…

Technologies

  • PHP Development
  • Flutter Development
  • Laravel Development
  • JavaScript Development
  • Node.js Development
  • Other Technologies…

Industries

  • Generative AI
  • Ecommerce
  • Restaurant
  • ITES
  • BFSI
  • Other Industries….

Resources

  • Blog
  • Case Studies
  • Quiz
  • Guides
  • Cost Calculator
  • Client Testimonials
About
  • About Us
  • Why Scaleupally
  • Culture of ScaleupAlly
  • Current Job Openings
  • ScaleupAlly Yearbooks
  • ScaleupAlly FAQs
Services
  • Generative AI
  • Mobile App Development
  • Custom Software Development
  • Data Analytics
  • Staff Augmentation
  • Other Services…
Technologies
  • PHP Development
  • Flutter Development
  • Laravel Development
  • JavaScript Development
  • Node.js Development
  • Other Technologies…
Industries
  • Generative AI
  • Ecommerce
  • Restaurant
  • ITES
  • BFSI
  • Other Industries….
Resources
  • Blog
  • Case Studies
  • Quiz
  • Guides
  • Cost Calculator
  • Client Testimonials

® Scaleupally – स्केलअप ऐलाय – /skeɪl ʌp ˈæl.aɪ/

©️ Admito Technologies Private Limited 2018- 2025  |  Privacy Policy  |  Sitemap

Discover Valuable Insights.

Get your free PDF now!

g10 (5)

Turn your ideas into reality with our expertise.

Frame 9450