Support the ongoing development of →
Configuration IOC Packages
Last updated 2 years ago.

Laravel provides a neat configuration class which is perfectly suited for that kind of tasks. You can just drop a configuration file into the app/config directory.

So in your case you would create a s3.php file in the config directory. Then just return an array with your configuration:

return [
	'bucket' => [
		'Bucket' => 'GLOBAL-BUCKET-NAME'

Then you can simply use:


For more configuration madness check the Docs

Last updated 2 years ago.

Or better still, use aws-sdk-php-laravel which is Amazon's own implementation of the PHP SDK for Laravel.

Then you can add your buckets to the config already provided as well as getting a nice Laravel facade to help with your syntax.

Last updated 2 years ago.

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.