Level 53
Try:
$card = App::make(BillingInterface::class);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to migrate the my app from Laravel 4.2 to Laravel 5.1. I've a stripe implementation here.
I've a BillingInterface.php and StripeBilling.php in my folder app\Acme\Billing.
I've the BillingServiceProvicer.php in app\Providers
In my PaymentController, I'm trying the following code and I'm getting an error:
$card = App::make('App\Acme\Billing\BillingInterface');
try {
$new_card = $card->addcard([
'customer_id' => $cards->customer_id,
'token' => Input::get('stripe_token')
]);
Error:
ReflectionException in Container.php line 736: Class App\Acme\Billing\BillingInterface does not exist
How can I solve this problem? update: @JeffreyWay Got some time?
Try:
$card = App::make(BillingInterface::class);
Please or to participate in this conversation.