Looking to hire Laravel developers? Try LaraJobs
This package is not available.

laravel-cdn-helper maintained by tozogluburak

Description
A Laravel package for CDN integration
Author
Last update
2024/08/21 04:32 (dev-master)
License
Links
Downloads
14

Comments
comments powered by Disqus

Laravel Cdn Helper

This package provides a simple way to integrate CDN support into your Laravel application.

Installation

  1. Add the package to your project via Composer:

    composer require tozogluburak/laravel-cdn-helper:^1.8
    
  2. Publish the package's configuration file:

    php artisan vendor:publish --provider="tozogluburak\CdnHelper\Discovery\CdnHelperDiscovery"
    
  3. After installation, the package will automatically add the CDN helper function to your project.

Configuration

The standard asset() function will be called if no CDN URLs are defined in the ./config/app.php config file.

Define the CDN URLs in the ./config/app.php file:

Add the following configuration to your app.php file:

<?php

return [
    /*
    |--------------------------------------------------------------------------
    | Application CDN domains
    |--------------------------------------------------------------------------
    |
    | Specify different domains for your assets.
    |
    */
    'cdn' => [
        "cdn.example.com" => "",
    ],
];