英文:
Class Not Found on Chargebee Library in Laravel
问题
I installed Chargebee library to my Laravel web (v5.7).
But when I want to use the library, all the class from the library is not found.
Here is my code on the controller
<?php
namespace App\Api\V2\Controllers;
use Chargebee\ChargeBee\Environment as ChargeBee_Environment;
use Chargebee\ChargeBee\Models\Plan as ChargeBee_Plan;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
class ChargebeeController extends Controller
{
public function retrieveItem($plan) {
ChargeBee_Environment::configure(env('CHARGEBEE_ENVIRONMENT'), env('CHARGEBEE_KEY'));
return $plan_response = ChargeBee_Plan::retrieve($plan);
}
}
The Chargebee\ChargeBee\Environment
and Chargebee\ChargeBee\Models\Plan
is not found.
英文:
I installed Chargebee library to my Laravel web (v5.7).
But when I want to use the library, all the class from the library is not found.
Here is my code on the controller
<?php
namespace App\Api\V2\Controllers;
use Chargebee\ChargeBee\Environment as ChargeBee_Environment;
use Chargebee\ChargeBee\Models\Plan as ChargeBee_Plan;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
class ChargebeeController extends Controller
{
public function retrieveItem($plan) {
ChargeBee_Environment::configure(env('CHARGEBEE_ENVIRONMENT'), env('CHARGEBEE_KEY'));
return $plan_response = ChargeBee_Plan::retrieve($plan);
}
}
The Chargebee\ChargeBee\Environment
and Chargebee\ChargeBee\Models\Plan
is not found.
答案1
得分: 0
我终于找到了答案。显然应该是ChargeBee\ChargeBee
。'B'应该大写。
英文:
I finally found my answer. Apparently it's supposed to be ChargeBee\ChargeBee
. The 'B' should be capital.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论