Shopify

How to Integrate Shopify App with Laravel

Hello Shopify Friends,

There are multiple ways to create Shopify Apps. In this article, we are going to learn How to Integrate Shopify App with Laravel. Before that have a look at my previous article that states, How to Get Shopify Product Data using Laravel.

Laravel is a web application framework with elegant syntax that simplifies common tasks. Shopify apps are used to add additional features to control and manage the Shopify store. Let’s see how you can Integrate Shopify App with Laravel.

For integrating Laravel with Shopify we are using osiset/laravel-shopify addon in Laravel.

Steps to Integrate Shopify App with Laravel:

Step 1: Run the following composer command in project root or you can clone or download a zip of osiset plugin from, 

https://github.com/osiset/laravel-shopify

and put it in the ‘vendor’ folder of the project.

Following command create ‘osiset’ folder in ‘vendor’ folder

composer require osiset/laravel-shopify

Step 2: Generate Config file:

The following command will create a Shopify configuration file in the ‘config’ folder

php artisan vendor:publish --tag=shopify-config

Step 3: Copy the API key, API secret key, and app name of your Shopify app and paste it into the Shopify configuration file created in the ‘config’ folder.

'app_name' => env('SHOPIFY_APP_NAME', 'shopify app name')
'api_key' => env('SHOPIFY_API_KEY', 'shopify api key')
'api_secret' => env('SHOPIFY_API_SECRET', 'shopify api secret')

Step 4: Use the following Middleware with your routes to access shop data:

middleware(['verify.shopify'])

Conclusion:

Consequently, you can successfully Integrate Shopify App with Laravel. For any doubts and queries, you can ping me in the comment box. Stay with us for upcoming tutorials. 

Happy Coding!

Click to rate this post!
[Total: 15 Average: 4.7]
Bharat Desai

Bharat Desai is a Co-Founder at MageComp. He is an Adobe Magento Certified Frontend Developer 🏅 with having 8+ Years of experience and has developed 150+ Magento 2 Products with MageComp. He has an unquenchable thirst to learn new things. On off days you can find him playing the game of Chess ♟️ or Cricket 🏏.

View Comments

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

2 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

2 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

3 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

6 days ago