在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):aws/aws-sdk-php-laravel开源软件地址(OpenSource Url):https://github.com/aws/aws-sdk-php-laravel开源编程语言(OpenSource Language):PHP 85.3%开源软件介绍(OpenSource Introduction):AWS Service Provider for Laravel 5/6/7/8/9This 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:
Jump To: Getting StartedInstallationThe AWS Service Provider can be installed via Composer by requiring the
{
"require": {
"aws/aws-sdk-php-laravel": "~3.0"
}
} Then run a composer update php composer.phar update To use the AWS Service Provider, you must register the provider when bootstrapping your application. LumenIn Lumen find the $app->register(Aws\Laravel\AwsServiceProvider::class); LaravelIn Laravel find the 'providers' => array(
// ...
Aws\Laravel\AwsServiceProvider::class,
) Find the 'aliases' => array(
// ...
'AWS' => Aws\Laravel\AwsFacade::class,
) ConfigurationBy 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. php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider" The settings can be found in the generated return [
'credentials' => [
'key' => env('AWS_ACCESS_KEY_ID', ''),
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
],
'region' => env('AWS_REGION', 'us-east-1'),
'version' => 'latest',
// You can override settings for specific services
'Ses' => [
'region' => 'us-east-1',
],
]; Note that you can always delete the Referring Laravel 5.2.0 Upgrade guide, you must using config
file instead of environment variable option if using php artisan Learn more about configuring the SDK on the SDK's User Guide. UsageIn 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. $s3 = App::make('aws')->createClient('s3');
$s3->putObject(array(
'Bucket' => 'YOUR_BUCKET',
'Key' => 'YOUR_OBJECT_KEY',
'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
)); If the AWS facade is registered within the $s3 = AWS::createClient('s3');
$s3->putObject(array(
'Bucket' => 'YOUR_BUCKET',
'Key' => 'YOUR_OBJECT_KEY',
'SourceFile' => '/the/path/to/the/file/you/are/uploading.ext',
)); Getting HelpPlease use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.
This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums. Opening IssuesIf you encounter a bug with The GitHub issues are intended for bug reports and feature requests. For help and questions with using ContributingWe work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our contributing guidelines before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution. Resources |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论