Support the ongoing development of →
Last updated 1 month ago.

Sounds like you need another class to wrap that API call in.

Create a new class and make sure it's going to be autoloaded. You might need to create a classes directory and then in your global start file add the directory to the class loader.



class Economic {

	public function pushCustomerData()
		// Place your API call in here


Then from within your store method you can get an instance of the Economic class and call the pushCustomerData method.

$economic = new Economic;


This is just the basic idea. You might like to create a constructor on that class to simplify a few things, especially if you have a number of API calls that you make that re-use the same connection details.

Last updated 1 month ago.

Thanks mate, got the idea.. Great input ;)

Last updated 1 month ago.

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

olebulow olebulow olebulow Joined 31 Jan 2014


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.