PHP code example of overnic / laravel-aliyun-oss

1. Go to this page and download the library: Download overnic/laravel-aliyun-oss 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/ */

    

overnic / laravel-aliyun-oss example snippets

bash
// config/app.php

'providers' => [
    '...',
    'Overnic\AliyunOss\AliyunOssServiceProvider',
];
bash
'oss' => [
    'driver'       => 'oss',
  	'access_id'    => 'Your oss access id',
  	'access_key' 	 => 'Your oss access key',
  	'bucket' 	     => 'Your project bucket on oss',
  	'endpoint'     => '', // 青岛节点需要指定,杭州节点不需要
    'prefix'       => ''  // Path prefix, default can keep empty
],