diff --git a/readme.md b/readme.md index d3a0e6d..621d15c 100644 --- a/readme.md +++ b/readme.md @@ -57,7 +57,7 @@ Laravel 5.4 and below: Add the service provider and facade to `config/app.php`: ```php 'aliases' => array( //... - 'Cdn' => Publiux\laravelcdn\Facades\CdnFacadeAccessor::class + 'CDN' => Publiux\laravelcdn\Facades\CdnFacadeAccessor::class ), ``` @@ -233,32 +233,32 @@ CAUTION: This will erase your entire bucket. This may not be what you want if yo #### Load Assets -Use the facade `Cdn` to call the `Cdn::asset()` function. +Use the facade `CDN` to call the `CDN::asset()` function. *Note: the `asset` works the same as the Laravel `asset` it start looking for assets in the `public/` directory:* ```blade -{{Cdn::asset('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/assets/js/main.js +{{CDN::asset('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/assets/js/main.js -{{Cdn::asset('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/assets/css/style.css +{{CDN::asset('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/assets/css/style.css ``` *Note: the `elixir` works the same as the Laravel `elixir` it loads the manifest.json file from build folder and choose the correct file revision generated by gulp:* ```blade -{{Cdn::elixir('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/build/assets/js/main-85cafe36ff.js +{{CDN::elixir('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/build/assets/js/main-85cafe36ff.js -{{Cdn::elixir('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/build/assets/css/style-2d558139f2.css +{{CDN::elixir('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/build/assets/css/style-2d558139f2.css ``` *Note: the `mix` works the same as the Laravel 5.4 `mix` it loads the mix-manifest.json file from public folder and choose the correct file revision generated by webpack:* ```blade -{{Cdn::mix('/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/js/main-85cafe36ff.js +{{CDN::mix('/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/js/main-85cafe36ff.js -{{Cdn::mix('/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/css/style-2d558139f2.css +{{CDN::mix('/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/css/style-2d558139f2.css ``` -To use a file from outside the `public/` directory, anywhere in `app/` use the `Cdn::path()` function: +To use a file from outside the `public/` directory, anywhere in `app/` use the `CDN::path()` function: ```blade -{{Cdn::path('private/something/file.txt')}} // example result: https://css-bucket.s3.amazonaws.com/private/something/file.txt +{{CDN::path('private/something/file.txt')}} // example result: https://css-bucket.s3.amazonaws.com/private/something/file.txt ```