I have a service provider that is registered with singleton binding:
namespace LaravelShipStation;
use Illuminate\Support\ServiceProvider;
class ShipStationServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton(ShipStation::class, function ($app) {
return new ShipStation(config('shipstation.apiKey'), config('shipstation.apiSecret'));
});
}
}
However when I call this class from application:
$shipStation = new ShipStation();
it produces the following error:
Type error: Too few arguments to function LaravelShipStation\ShipStation::__construct(), 0 passed, exactly 2 expected