Download the PHP package boaideas/laravel-shopify without Composer
On this page you can find all versions of the php package boaideas/laravel-shopify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download boaideas/laravel-shopify
More information about boaideas/laravel-shopify
Files in boaideas/laravel-shopify
Package laravel-shopify
Short Description An easier to use rocket-code/shopify for Shopify integration in Laravel applications
License MIT
Homepage https://github.com/amosmos/laravel-shopify
Informations about the package laravel-shopify
Easier Laravel integration for rocket-code/shopify
This packages allows for a better integration of rocket-code/shopify in Laravel applications.
Benefits
By using this package you get these added values:
- Auto discovery (Laravel 5.5 or higher) - no need to manually add any service provider
- Configuration in env file
- Allow the service to be used in dependency injection
- Allow usage as real time facade (Laravel 5.4 or higher)
Installation
You can install the package via composer:
If you're installing the package on Laravel 5.5 or higher, you're done (The package uses Laravel's auto package discovery).
If you're using Laravel 5.4 or less, add the BOAIdeas\Shopify\ShopifyServiceProvider
service provider to your providers array:
Configuration
Now, by default, the package will look for the following values in your .env file:
If, for some reason, you want to change any of these settings, you can publish the config file with:
This is the content of the published config file:
Usage
Once installed, you can use the service by either injecting it to your methods or as a real time facade, and then just use it regularly.
For more information about how to use the service, look at https://github.com/joshrps/laravel-shopify-API-wrapper.
Dependency Injection
Now you can simply type hint the service in your method's arguments. For better readabilty, we prefer to import the full class name with a use
statement, and alias it to Shopify while we're at it.
Facade
Now you can use Laravel's on the fly facades feature to use the service "statically". We prefer to alias it to ShopifyAPI while we're at it.
Credits
- Amos Shacham
- All Contributors
License
The MIT License (MIT). Please see License File for more information.