Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Laravel 5.4 #22

Open
smick opened this issue Feb 15, 2017 · 4 comments
Open

Support for Laravel 5.4 #22

smick opened this issue Feb 15, 2017 · 4 comments

Comments

@smick
Copy link

smick commented Feb 15, 2017

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.

@ShaunaGordon
Copy link

While the make format doesn't work anymore, you can still use new RocketCode\Shopify\API to create a new instance with parameters.

@dvkhang
Copy link

dvkhang commented Feb 21, 2017

please example , i need it

@jnguyendevel
Copy link

put this line at the top of your controller:
use RocketCode\Shopify\API

instead of
$sh = App->Make('ShopifyAPI');

do this:
$sh = new API;

@mikebe11
Copy link

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.
laravel/framework#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' => '']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants