ktc/cdn is a Laravel package for content server for lavavel/voyager ktc.
It currently has 0 GitHub stars and 17 downloads on Packagist (latest version 1.0.62).
Install it with composer require ktc/cdn.
Discover more Laravel packages by ktc
or browse all Laravel packages to compare alternatives.
Last updated
Steps for installing the CDN for lavavel and voyager.
Complete documentation on the official website of Laravel
It runs on the console the following command of composer
composer global require laravel/envoy
composer require ktc/cdn
Edit the file /config/app.php
Adds a new value at the end of the array providers
'providers' => [
//....
//...
//.
CDN\CDNServiceProvider::class
Edit the file /config/filesystems.php
Adds a new value at the end of the array disks
'disks' => [
//....
//...
//.
'sftp' => [
'driver' => 'sftp',
'host' => env('CDN_SSH_HOST'),
'port' => 22,
'username' => env('CDN_SSH_USERNAME'),
'password' => '',
'privateKey' => env('CDN_SSH_PRIVATE_KEY_PATH'),
'root' => env('CDN_BASE').'/'.env('CDN_BASE_SUBDIRECTORY'),
]
php artisan cdn:install
Follow the instructions
After generating the installation your project will contain the following keys:
FILESYSTEM_DRIVER It defines the new driver to use (default is sftp).
CDN_BASE Actual absolute path where are stored across content repositories
CDN_BASE_SUBDIRECTORY ID only, create a directory for the project, do not use special characters or spaces.
CDN_SSH_USERNAME User's ssh connection that is used locally.
CDN_SSH_PRIVATE_KEY_PATH Key SSH connection, the path must be absolute to the computer.
CDN_SSH_HOST Connection to the CDN host
CDN_PUBLIC Access for the public to the CDN
Example
FILESYSTEM_DRIVER=sftp
CDN_BASE=/example/path
CDN_BASE_SUBDIRECTORY=exampleProject
CDN_SSH_USERNAME=root
CDN_SSH_PRIVATE_KEY_PATH=/Users/example/.ssh/id_rsa
CDN_SSH_HOST=experience.ktcagency.com
CDN_PUBLIC=cdn.experience.ktcagency.com
Ready.
Edit the file /config/voyager.php
Changes the value of storage
'storage' =>
[
'disk' => 'sftp',
],