在Laravel 5.1类中找不到分条计费


Stripe Billing in Laravel 5.1 Class not found

我正试图将我的应用程序从Laravel 4.2迁移到Laravel 5.1。我在这里有一个条带实现。

我有一个BillingInterface.phpStripeBilling.php在我的文件夹app'Acme'Billing

我有BillingServiceProvicer.phpapp'Providers

在我的PaymentController中,我正在尝试以下代码,我得到一个错误:

use Acme'Billing;
$card = App::make('App'Acme'Billing'BillingInterface');
try {
   $new_card = $card->addcard([
   'customer_id' => $cards->customer_id,
    'token' => Input::get('stripe_token')
 ]);
错误:

Container.php第736行中的ReflectionException: ClassApp'Acme'Billing'BillingInterface不存在

我该如何解决这个问题?

这对我很有帮助:

$card = App::make(BillingInterface::class);