---
title: "How to Add File in Shopify Store using Laravel?"
url: "https://magecomp.com/blog/add-file-in-shopify-store-using-laravel/"
date: "2023-01-04T13:12:50+00:00"
modified: "2025-01-30T10:24:43+00:00"
author:
  name: "Bharat Desai"
  url: "https://magecomp.com"
categories:
  - "How To"
  - "Laravel"
word_count: 251
reading_time: "2 min read"
summary: "Hello Laravel Friends,"
description: "Add file to Shopify store to perform any actions. Step 1: Integrate osiset/laravel-shopify addon. Read more….."
keywords: "How To, Laravel"
language: "en"
schema_type: "Article"
related_posts:
  - title: "CRUD Operation in Laravel 8: Step by Step Tutorial"
    url: "https://magecomp.com/blog/crud-operation-laravel-8/"
  - title: "How to Get Order Status in sales_order_place_after event in Magento 2"
    url: "https://magecomp.com/blog/get-order-status-sales-order-place-after-event-magento-2/"
  - title: "Magento 2: How to Secure API Endpoints with Custom ACL Resources"
    url: "https://magecomp.com/blog/magento-2-secure-api-endpoints-with-custom-acl-resources/"
---

# How to Add File in Shopify Store using Laravel?

_Published: January 4, 2023_  
_Author: Bharat Desai_  

![How to Add File in Shopify Store using Laravel](https://magecomp.com/blog/wp-content/uploads/2023/01/How-to-Add-File-in-Shopify-Store-using-Laravel-1024x512.webp)

**Hello Laravel Friends,**

In today’s blog file, I will discuss How to Add File in Shopify Store using Laravel.
[![Laravel Development Services](https://magecomp.com/blog/wp-content/uploads/2024/12/Laravel-Development-Services-4.webp)](https://magecomp.com/services/laravel-development-services/)

We sometimes have to add a theme file in our Shopify store to perform any action in the front store. We can add file in the theme by theme id. [**Get Active Theme ID of Shopify Store**](https://magecomp.com/blog/get-active-theme-id-shopify-laravel-app/).
We have used osiset/laravel-shopify addon to add file to the Shopify store.
## Steps to Add File in Shopify Store using Laravel:
**Step 1:** Integrate osiset/laravel-shopify addon with your Shopify app.
**Note:** You can add file in the theme either from the controller or from the view file (blade file).
**Step 2:** If you are adding file from the controller, then add the following class in your controller file after namespace
```
use IlluminateSupportFacadesAuth;
```

[![Hire laravel Developer](https://magecomp.com/blog/wp-content/uploads/2024/12/Hire-Laravel-Expert-Now-3.webp)](https://magecomp.com/services/hire-laravel-developer/)

**Step 3:** Use the following code in php file to add file in theme by theme id:
```
$data = file_get_contents(storage_path('your path));

        $param = [
            'asset'=>[
                'key'=>'snippets/filename.liquid',
                'value'=>$data
            ]
        ];
        $this->shop->request('put','themes/{theme_id}/assets.json',$param);
```

**Note –** The above code will add the file to the snippet folder, but you can also change it as per your requirement.
## Conclusion:
Accordingly, you can Add File in Shopify Store using Laravel. If you have any doubts, connect with me through the comment section. Share the tutorial with your other Shopify developer friends and stay in the know so that you do not miss any updates from us.
[![Contact Us](https://magecomp.com/blog/wp-content/uploads/2024/12/Contact-Us-3.webp)](https://magecomp.com/contact)

**Happy Coding!**


---

_View the original post at: [https://magecomp.com/blog/add-file-in-shopify-store-using-laravel/](https://magecomp.com/blog/add-file-in-shopify-store-using-laravel/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-10-05 21:22:56 UTC_  
