我使用以下行更新了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
答案 0 :(得分:1)
您需要为Laravel安装SDK包。它将AWS库作为其依赖项之一安装:
{
"require": {
"aws/aws-sdk-php-laravel": "~3.0"
}
}