升级到Laravel 5.1 AWS SDK无法正常工作

时间:2015-07-26 21:55:25

标签: php laravel laravel-5 aws-sdk

我使用以下行更新了composer.json:

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "illuminate/html": "5.0.*@dev",
    "aws/aws-sdk-php": "~3.0"

让作曲家更新,然后更新我的config / app.php文件:

'providers' => [
    Aws\Laravel\AwsServiceProvider::class,

'aliases' => [
    'AWS'       => Aws\Laravel\AwsFacade::class,

我试图像这样调用AWS S3 Bucket(在L4.2中工作):

$s3 = App::make('aws')->get('s3');

我收到此错误:

FatalErrorException in ProviderRepository.php line 146:
Class 'Aws\Laravel\AwsServiceProvider' not found

1 个答案:

答案 0 :(得分:1)

您需要为Laravel安装SDK包。它将AWS库作为其依赖项之一安装:

{
  "require": {
    "aws/aws-sdk-php-laravel": "~3.0"
  }
}

在这里查看官方文档:https://github.com/aws/aws-sdk-php-laravel