PHPackages                             braunson/laravel-rackspace-cdn - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. braunson/laravel-rackspace-cdn

ActiveLibrary[HTTP &amp; Networking](/categories/http)

braunson/laravel-rackspace-cdn
==============================

Updated version of ThomasWelton's because that repo seems to be inactive

0.5.0(8y ago)1381PHPPHP &gt;=5.4.0

Since Aug 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Braunson/laravel-rackspace-cdn)[ Packagist](https://packagist.org/packages/braunson/laravel-rackspace-cdn)[ RSS](/packages/braunson-laravel-rackspace-cdn/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (10)Used By (0)

**README for Laravel 4.x is [here](./README_L4.md)**

Installation
============

[](#installation)

Run command in your terminal to include this package as a dependency:

```
composer require braunson/laravel-rackspace-opencloud
```

Register the OpenCloud service provider and alias the OpenCloud, Str (removed in Laravel 5.0+) facades by adding it to the providers and aliases arrays in the `config/app.php` file.

For Laravel 5.5 and later **don't need** (auto discovery).

For Laravel 5.2 - 5.4:

```
'providers' => [
    Braunson\LaravelRackspaceCdn\LaravelRackspaceCdnServiceProvider::class
];
```

```
'aliases' => [
    'OpenCloud' => Braunson\LaravelRackspaceCdn\Facades\OpenCloud::class,
    'Str' => Illuminate\Support\Str::class,
]
```

For Laravel 5.1 and earlier:

```
'providers' => [
    'Braunson\LaravelRackspaceCdn\LaravelRackspaceCdnServiceProvider'
]
```

```
'aliases' => [
    'OpenCloud' => 'Braunson\LaravelRackspaceCdn\Facades\OpenCloud',
    'Str' => 'Illuminate\Support\Str',
]
```

Configuration
-------------

[](#configuration)

Copy the config files into your project by running:

```
php artisan vendor:publish --provider="Braunson\LaravelRackspaceCdn\LaravelRackspaceCdnServiceProvider"

```

Edit the config file to include your username, api key, region and url (internal or public).

Usage
=====

[](#usage)

Artisan Commands
----------------

[](#artisan-commands)

Upload files via the command line.

Synchronize a whole directory. Copies all files to `/public/assets`:

```
php artisan cdn:sync public/assets

```

Copies all files to `/assets` trimming 'public' from the path:

```
php artisan cdn:sync public/assets --trim=public

```

You can configure your `package.json` to do this as NPM task:

```
"scripts": {
    "cdn:sync": "php artisan cdn:sync public/assets --trim=public"
},
```

The sync command will save a file adjacent to the synchronized directory. It contains the http and https urls for your container. Along with a md5 hash of the directory. In this way when a file changes inside a directory and is reuploaded you get a new cache busted URL.

If you are using the URL helper then it will return a CDN url for a file, if it finds a `*.cdn.json` file adjacent to one of it's parent directories.

```
URL::asset('assets/image.jpg');
```

You should be able to run `php artisan cdn:sync public/assets --trim=public` before or during a deployment and once complete all files being called by `URL::asset()` will return a CDN resource.

Upload to CDN
-------------

[](#upload-to-cdn)

```
OpenCloud::upload($container, $file, $name = null)
```

- `$container` - (string) Name of the container to upload into;
- `$file` - (string / UploadedFile) Path to file, or instance of `Symfony\Component\HttpFoundation\File\UploadedFile` as returned by `Request::file()`;
- `$name` - (string) Optional file name to be used when saving the file to the CDN.

Example:

```
Route::post('/upload', function()
{
    // '\Input' alias was removed from the default aliases in Laravel 5.2+
    if(Request::hasFile('image')){
        $file = OpenCloud::upload('my-container', Request::file('image'));
    }

    $cdnUrl = $file->PublicURL();
    // Do something with $cdnUrlth

    return Redirect::to('/upload');
});
```

Delete from CDN
---------------

[](#delete-from-cdn)

```
OpenCloud::delete($container, $file)
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~189 days

Recently: every ~362 days

Total

9

Last Release

3130d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.3.0

0.5.0PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/63da0e8217209947f209b77dbf342ec7bbc4507e986fa09a9c2a6c2708547738?d=identicon)[BraunsonYager](/maintainers/BraunsonYager)

---

Top Contributors

[![Braunson](https://avatars.githubusercontent.com/u/577273?v=4)](https://github.com/Braunson "Braunson (22 commits)")[![thomaswelton](https://avatars.githubusercontent.com/u/678372?v=4)](https://github.com/thomaswelton "thomaswelton (10 commits)")[![cadyfatcat](https://avatars.githubusercontent.com/u/765649?v=4)](https://github.com/cadyfatcat "cadyfatcat (2 commits)")[![mazedlx](https://avatars.githubusercontent.com/u/9453522?v=4)](https://github.com/mazedlx "mazedlx (2 commits)")[![lucacri](https://avatars.githubusercontent.com/u/2913531?v=4)](https://github.com/lucacri "lucacri (1 commits)")

### Embed Badge

![Health badge](/badges/braunson-laravel-rackspace-cdn/health.svg)

```
[![Health](https://phpackages.com/badges/braunson-laravel-rackspace-cdn/health.svg)](https://phpackages.com/packages/braunson-laravel-rackspace-cdn)
```

###  Alternatives

[danharrin/livewire-rate-limiting

Apply rate limiters to Laravel Livewire actions.

40523.1M27](/packages/danharrin-livewire-rate-limiting)[mateusjunges/laravel-kafka

A kafka driver for laravel

7163.1M17](/packages/mateusjunges-laravel-kafka)[illuminate/http

The Illuminate Http package.

11936.0M5.1k](/packages/illuminate-http)[ricorocks-digital-agency/soap

A SOAP client that provides a clean interface for handling requests and responses.

4281.8M5](/packages/ricorocks-digital-agency-soap)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[laravel-shift/curl-converter

A command line tool to convert curl requests to Laravel HTTP requests.

935.3k](/packages/laravel-shift-curl-converter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
