Download the PHP package bnagydeveloper/aws-sdk-php-laravel without Composer
On this page you can find all versions of the php package bnagydeveloper/aws-sdk-php-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bnagydeveloper/aws-sdk-php-laravel
More information about bnagydeveloper/aws-sdk-php-laravel
Files in bnagydeveloper/aws-sdk-php-laravel
Package aws-sdk-php-laravel
Short Description A simple Laravel 5 service provider for including the AWS SDK for PHP.
License Apache-2.0
Homepage http://aws.amazon.com/sdkforphp2
Informations about the package aws-sdk-php-laravel
AWS Service Provider for Laravel 5
This is a simple Laravel service provider for making it easy to include the official AWS SDK for PHP in your Laravel and Lumen applications.
This README is for version 3.x of the service provider, which is implemented to work with Version 3 of the AWS SDK for PHP and Laravel 5.1.
Major Versions:
- 3.x (YOU ARE HERE) - For
laravel/framework:~5.1|~6.0
andaws/aws-sdk-php:~3.0
- 2.x (2.0 branch) - For
laravel/framework:5.0.*
andaws/aws-sdk-php:~2.4
- 1.x (1.0 branch) - For
laravel/framework:4.*
andaws/aws-sdk-php:~2.4
Installation
The AWS Service Provider can be installed via Composer by requiring the
aws/aws-sdk-php-laravel
package in your project's composer.json
.
Then run a composer update
To use the AWS Service Provider, you must register the provider when bootstrapping your application.
Lumen
In Lumen find the Register Service Providers
in your bootstrap/app.php
and register the AWS Service Provider.
Laravel
In Laravel find the providers
key in your config/app.php
and register the AWS Service Provider.
Find the aliases
key in your config/app.php
and add the AWS facade alias.
Configuration
By default, the package uses the following environment variables to auto-configure the plugin without modification:
To customize the configuration file, publish the package configuration using Artisan.
The settings can be found in the generated config/aws.php
configuration file. By default, the credentials and region settings will pull from your .env
file.
Note that you can always delete the credentials
line from this file if you'd like to use the default SDK Configuration Provider chain instead.
Referring Laravel 5.2.0 Upgrade guide, you must using config
file instead of environment variable option if using php artisan config:cache
.
Learn more about configuring the SDK on the SDK's User Guide.
Usage
In order to use the AWS SDK for PHP within your app, you need to retrieve it from the Laravel Service Container. The following example uses the Amazon S3 client to upload a file.
If the AWS facade is registered within the aliases
section of the application configuration, you can also use the
following technique.