PHP code example of maelga / laravel-google-cloud-storage
1. Go to this page and download the library: Download maelga/laravel-google-cloud-storage library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
maelga / laravel-google-cloud-storage example snippets
'gcs' => [
'driver' => 'gcs',
'key_file_path' => env('GOOGLE_CLOUD_KEY_FILE', null), // optional: /path/to/service-account.json
'key_file' => [], // optional: Array of data that substitutes the .json file (see below)
'project_id' => env('GOOGLE_CLOUD_PROJECT_ID', 'your-project-id'), // optional: is public|private
'metadata' => ['cacheControl'=> 'public,max-age=86400'], // optional: default metadata
],