You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, the only CDN provider available is AwsS3. This option cannot be set in '.env'.
131
+
For now, the only CDN provider available is AwsS3. Although, as DO natively support the AWS API, you can utilise it by also providing the endpoint, please see the cdn.php config for more info. This option cannot be set in '.env'.
131
132
132
133
```php
133
134
'default' => 'AwsS3',
@@ -139,9 +140,10 @@ For now, the only CDN provider available is AwsS3. This option cannot be set in
139
140
'aws' => [
140
141
141
142
's3' => [
142
-
143
+
143
144
'version' => 'latest',
144
145
'region' => '',
146
+
'endpoint' => '', // For DO Spaces
145
147
146
148
'buckets' => [
147
149
'my-backup-bucket' => '*',
@@ -156,7 +158,7 @@ For now, the only CDN provider available is AwsS3. This option cannot be set in
156
158
'buckets' => [
157
159
158
160
'my-default-bucket' => '*',
159
-
161
+
160
162
// 'js-bucket' => ['public/js'],
161
163
// 'css-bucket' => ['public/css'],
162
164
// ...
@@ -231,32 +233,32 @@ CAUTION: This will erase your entire bucket. This may not be what you want if yo
231
233
232
234
#### Load Assets
233
235
234
-
Use the facade `Cdn` to call the `Cdn::asset()` function.
236
+
Use the facade `CDN` to call the `CDN::asset()` function.
235
237
236
238
*Note: the `asset` works the same as the Laravel `asset` it start looking for assets in the `public/` directory:*
237
239
238
240
```blade
239
-
{{Cdn::asset('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/assets/js/main.js
241
+
{{CDN::asset('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/assets/js/main.js
240
242
241
-
{{Cdn::asset('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/assets/css/style.css
243
+
{{CDN::asset('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/assets/css/style.css
242
244
```
243
245
*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:*
244
246
```blade
245
-
{{Cdn::elixir('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/build/assets/js/main-85cafe36ff.js
247
+
{{CDN::elixir('assets/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/build/assets/js/main-85cafe36ff.js
246
248
247
-
{{Cdn::elixir('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/build/assets/css/style-2d558139f2.css
249
+
{{CDN::elixir('assets/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/build/assets/css/style-2d558139f2.css
248
250
```
249
251
*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:*
250
252
```blade
251
-
{{Cdn::mix('/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/js/main-85cafe36ff.js
253
+
{{CDN::mix('/js/main.js')}} // example result: https://js-bucket.s3.amazonaws.com/public/js/main-85cafe36ff.js
252
254
253
-
{{Cdn::mix('/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/css/style-2d558139f2.css
255
+
{{CDN::mix('/css/style.css')}} // example result: https://css-bucket.s3.amazonaws.com/public/css/style-2d558139f2.css
254
256
```
255
257
256
-
To use a file from outside the `public/` directory, anywhere in `app/` use the `Cdn::path()` function:
258
+
To use a file from outside the `public/` directory, anywhere in `app/` use the `CDN::path()` function:
257
259
258
260
```blade
259
-
{{Cdn::path('private/something/file.txt')}} // example result: https://css-bucket.s3.amazonaws.com/private/something/file.txt
261
+
{{CDN::path('private/something/file.txt')}} // example result: https://css-bucket.s3.amazonaws.com/private/something/file.txt
260
262
```
261
263
262
264
@@ -295,6 +297,21 @@ The MIT License (MIT). Please see [License File](https://github.com/publiux/lara
295
297
296
298
## Changelog
297
299
300
+
#### v2.0.4
301
+
- Added API support for DigitalOcean Spaces
302
+
303
+
#### v2.0.3
304
+
- Added support for an upload folder prefix
305
+
306
+
#### v2.0.2
307
+
- Updated readme to detail instructions on Laravel <5.5 usage
308
+
309
+
#### v2.0.1
310
+
- Fixed typo in composer.json
311
+
312
+
#### v2.0.0
313
+
- Support for Laravel 5.5
314
+
298
315
#### v1.0.3
299
316
- Fixed bug where schemeless Urls could not be used for CloudFront. Valid urls now begin with http, https, or simply '//'
0 commit comments