Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Tithira's avatar

cdn configuration file missing

I am using https://github.com/publiux/laravelcdn and i have configured app.php and .env as in the documentation.When pushing the files to cdn it throws me this error https://drive.google.com/file/d/1Mr1SgWy0KFke7pZ10PXKDVYGatOqw66M/view?usp=sharing. How can i fix this ?

0 likes
9 replies
prasadchinwal5's avatar
Level 35

@tithira I think the error says for itself. You are missing the config/cdn.php. If you are using Laravel 5.4 or below do this in the config/app.php


'providers' => array(
     //...
     Publiux\laravelcdn\CdnServiceProvider::class,
),

and then add an alias

'aliases' => array(
     //...
     'CDN' => Publiux\laravelcdn\Facades\CdnFacadeAccessor::class
),

Now you have to run artisan publish

php artisan vendor:publish --provider 'Publiux\laravelcdn\CdnServiceProvider'
1 like
Tithira's avatar

@PRASADCHINWAL5 - I am using laravel 5.6 and i have added and published the package.I have declared in the app.php yet getting the cdn.php config file not found error.

Tithira's avatar

I haven't had published the vendor after entering the classes, it caused me the error, now i got the cdn.php file :) Thanks for the help

prasadchinwal5's avatar

@tithira oh I believe then we need to figure out why the cdn.php file was not published?

  • Could you try removing the package import in composer.json file.
  • Then try composer update
  • Next php composer require "publiux/laravelcdn:~2.0"
  • Add service providers to app.php
  • Last is to run artisan publish
1 like
Tithira's avatar

@PRASADCHINWAL5 - yes.earlier it didn't work ,i tried it once more and it works like a charm :) Thank you for the help

Please or to participate in this conversation.