DEV Community

Muneeb Ur Rehman
Muneeb Ur Rehman

Posted on

Shopify App 🖇️ with laravel ✨

Install Laravel-Shopify Package

composer require osiset/laravel-shopify

After installing above package run this command inside your project root directory.

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

You're now able to access config in config/shopify-app.php

In your app's settings on your Shopify Partner dashboard, you need to set the callback URL to be:


And the redirect_uri to be:


The callback URL will point to the home route, while the redirect_uri will point to the authentication route.

NOTE:Those two URLs must start with https, otherwise you will get an error message: "Oauth error invalid_request: The redirect_uri is not whitelisted"

Modify Env File

SHOPIFY_APP_HOST_NAME="(you app host name)"
SHOPIFY_API_KEY="(your api key)"
SHOPIFY_API_SECRET="(your secret token)"
Enter fullscreen mode Exit fullscreen mode

Modify Routing

update routes/web.php file:

Route::get('/', function () {
    return view('welcome');
Enter fullscreen mode Exit fullscreen mode

Next, modify resources/views/welcome.blade.php to extend this packages' layout for Shopify AppBridge abilities, example:


    <!-- You are: (shop domain name) -->
    <p>You are: {{ $shopDomain ?? Auth::user()->name }}</p>


        actions.TitleBar.create(app, { title: 'Welcome' });
Enter fullscreen mode Exit fullscreen mode

Top comments (0)