gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Add Publishing Views Tag #1170

Closed ronnorthrip closed 2 years ago

ronnorthrip commented 2 years ago

I'd suggest that we add the ability to publish the views so people can override them easier and so we can match other packages.

php artisan vendor:publish --provider="osiset\laravel-shopify" --tag=views

Should copy the files from src/resources/views into APP/resources/vendor/shopify-app.

I point this out not only to follow the dev ex from other packages but also because the dir name isn't the exact same as the vendor package.

Thoughts?

dev-talha-anwar commented 2 years ago

it is already done you can use use php artisan vendor:publish command to check the list and publish the views using shopify-views tag

ronnorthrip commented 2 years ago

views would be better than shopify-views - but at least put that in the docs please

Kyon147 commented 2 years ago

You can override views already in packages, as you just need to put the vendor folder inside the views folder and then the file you wish to override.

It would look something like this

- resources 
- - views
- - - vendor
- - - - shopify-app
- - - - - layouts 
- - - - - - default.blade.php