PHP code example of presentator / starter

1. Go to this page and download the library: Download presentator/starter 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/ */

    

presentator / starter example snippets


    'components' => [
        ...
        'authClientCollection' => [
            'class' => 'yii\authclient\Collection',
            'clients' => [
                'facebook' => [
                    'class'        => 'yii\authclient\clients\Facebook',
                    'clientId'     => 'YOUR_APP_CLIENT_ID',
                    'clientSecret' => 'YOUR_APP_CLIENT_SECRET',
                ],
            ],
        ],
    ]
    

    // base public url to the storage directory (could be also a cdn address if you use S3 or other storage mechanism)
    'baseStorageUrl' => 'https://example.com/storage',
    

    'components' => [
        'fs' => new \yii\helpers\ReplaceArrayValue([
            'class'   => 'creocoder\flysystem\AwsS3Filesystem',
            'key'     => 'YOUR_KEY',
            'secret'  => 'YOUR_SECRET',
            'bucket'  => 'YOUR_BUCKET',
            'region'  => 'YOUR_REGION',
            'options' => [
                'ACL' => 'public-read',
            ],
            // other parameters:
            // 'version'  => 'latest',
            // 'baseUrl'  => 'YOUR_BASE_URL',
            // 'prefix'   => 'YOUR_PREFIX',
            // 'endpoint' => 'http://your-url'
        ]),
        ...
    ]