我已经发表里面的配置文件app/config/packages/lightshire/laravel/使用php artisan config:publish.我正试图访问它
$client_id = Config::get('lightshire/laravel-paypal::client_id');
Run Code Online (Sandbox Code Playgroud)
它返回的是 array(0) { }
我的服务提供商
<?php
namespace Lightshire\Paypal;
use Illuminate\Support\ServiceProvider as IlluminateServiceProvider;
class PaypalServiceProvider extends IlluminateServiceProvider
{
protected $defer = false;
public function boot()
{
$this->package("lightshire/laravel-paypal");
include app_path()."/routes.php";
}
public function register()
{
$this->app["paypal"] = $this->app->share(function($app)
{
return new Paypal;
});
}
public function provides()
{
return array('paypal');
}
}
Run Code Online (Sandbox Code Playgroud)
我的Paypal.php
<?php
namespace Lightshire\Paypal;
require base_path()."/vendor/autoload.php";
use App;
use Config;
class Paypal
{
private $creds = null;
private $token = …Run Code Online (Sandbox Code Playgroud)