Open smick opened 7 years ago
While the make format doesn't work anymore, you can still use new RocketCode\Shopify\API
to create a new instance with parameters.
please example , i need it
put this line at the top of your controller:
use RocketCode\Shopify\API
instead of
$sh = App->Make('ShopifyAPI');
do this:
$sh = new API;
Just spent time wondering why the make with setup shortcut wouldn't work for me and turns out it was the removal of make() with params. You can now use makeWith() in newer 5.4 versions of Laravel. It was added to about a month ago. I just upgraded from 5.4.15 => 5.4.19 and it's in there. https://github.com/laravel/framework/pull/18271
So now either should work:
$sh = App::make('ShopifyAPI');
$sh->setup(['API_KEY' => '', 'API_SECRET' => '', 'SHOP_DOMAIN' => '', 'ACCESS_TOKEN' => '']);
or
$sh = App::makeWith('ShopifyAPI', ['API_KEY' => '', 'API_SECRET' => '', 'SHOP_DOMAIN' => '', 'ACCESS_TOKEN' => '']);
Greetings,
When I install in Laravel 5.4 I get the following error:
FatalThrowableError in shopify.php line 11: Class 'App\Http\Controllers\App' not found
It looks like the
App->Make()
parameters have been removed from Laravel, which is a breaking change for your API.