Which hook should I use to create app files in theme at the time of installation of App

Which hook should I use to create app files in theme at the time of installation of App

Kiran786
Shopify Partner
3 0 0

am new to Shopify app development and creating a simple contact app which have contact form and all the submission from this form will be saved in the database of the App. I using Laravel for the app development and using osiset/laravel-shopify package for creating connection of app with the Shopify.

 

Now I want to create a liquid file in the theme at the time of installation of app. I know that I have to call the shop API and get the active theme Id and then using API I can create it. Here is the post I found for the same. But I don't understand at which event/hook or where would I add the code to create the file. I searched for it and didn't found a working solution. Can anyone guide me to the right direction of how I can achieve this.

 

Many Thanks

Replies 0 (0)