I installed the https://github.com/aws/aws-sdk-php-laravel SDK and followed the instructions in the readme.md. Everything installed, I put in my key, secret, region, etc. in the /app/config/packages/aws/aws-sdk-php-laravel
.
The Error I'm Getting
PHP Fatal error: Class 'Aws\Common\Aws' not found in /Volumes/Data/Users/chris/Sites/ln.com/vendor/aws/aws-sdk-php-laravel/src/Aws/Laravel/AwsServiceProvider.php on line 48
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Aws\\Common\\Aws' not found","file":"\/Volumes\/Data\/Users\/chris\/Sites\/ln.com\/vendor\/aws\/aws-sdk-php-laravel\/src\/Aws\/Laravel\/AwsServiceProvider.php","line":48}}
Line 48 of that file referenced above simply says:
$aws = Aws::factory($config);
I installed per the instructions
I put in my providers and aliases in /app/config/app.php with:
'Aws\Laravel\AwsServiceProvider'
in the providers array.
I put in:
'AWS' => 'Aws\Laravel\AwsFacade'
in the aliases section.
Then, I'm trying to use their same usage example:
$s3 = AWS::get('s3');
$s3->putObject(array(
'Bucket' => 'My Bucket',
'Key' => 'My Key',
'SourceFile'=> Config::get('settings.ProcessListings.image_dir') . $listing->mls_listing_id . "/test.txt"
));
What I've Tried
My only thoughts here were that in my file that I'm trying to use the SDK in, at the top I have:
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
I've added to that:
use Aws\Laravel\AwsFacade;
use Aws\Laravel\AwsServiceProvider;
and combinations of the two but neither work. Any ideas?