PHPackages                             lucasromanojf/laravel5-soundcloud - 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. [API Development](/categories/api)
4. /
5. lucasromanojf/laravel5-soundcloud

ActiveLibrary[API Development](/categories/api)

lucasromanojf/laravel5-soundcloud
=================================

Soundcloud API Service Provider For Laravel 5

013PHP

Since Jan 17Pushed 3y agoCompare

[ Source](https://github.com/lucasromanojf/laravel5-soundcloud)[ Packagist](https://packagist.org/packages/lucasromanojf/laravel5-soundcloud)[ RSS](/packages/lucasromanojf-laravel5-soundcloud/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

[![Total Downloads](https://camo.githubusercontent.com/a380b64ace475529f8cd629989275fc9fe576131949e6e593f33d899dfded764/68747470733a2f2f706f7365722e707567782e6f72672f6e6a61736d2f6c61726176656c352d736f756e64636c6f75642f646f776e6c6f6164732e706e67)](https://packagist.org/packages/njasm/laravel5-soundcloud)[![License](https://camo.githubusercontent.com/f8067c1b57c059cf91186a3f663ae9c58610b74c23840940264a4a567debd8cc/68747470733a2f2f706f7365722e707567782e6f72672f6e6a61736d2f6c61726176656c352d736f756e64636c6f75642f6c6963656e73652e706e67)](https://packagist.org/packages/njasm/laravel5-soundcloud)

Laravel 5 - Soundcloud Api Service Provider
-------------------------------------------

[](#laravel-5---soundcloud-api-service-provider)

Soundcloud API Service Provider For Laravel 5

- [Installation](#installation)
- [SoundCloud Credentials](#soundcloud-credentials)
- [Configuration](#configuration)
- [Usage](#usage)

### Installation

[](#installation)

The package can be installed via Composer by requiring the `"njasm/laravel5-soundcloud": "dev-master"` package in your project's composer.json.

```
{
    "require": {
        "njasm/laravel5-soundcloud": "dev-master"
    },
    "minimum-stability": "dev"
}
```

Next you need to add the service provider to `config/app.php`.

```
'providers' => [
    // ...
    Njasm\Laravel\Soundcloud\SoundcloudProvider::class,
],
```

Additionally, if you wish to use the Facade, you may register an alias for it in `config/app.php`:

```
'aliases' => [
    // ...
    'Soundcloud' => Njasm\Laravel\Soundcloud\Facades\Soundcloud::class,
],
```

We've also got a dedicated config file, which can be published by running the following command:

```
php artisan vendor:publish --provider="Njasm\Laravel\Soundcloud\SoundcloudProvider"

```

### SoundCloud Credentials

[](#soundcloud-credentials)

Since you most-likely don't want your `client_id`, `client_secret`, `username` or `password` to be on your repository (for security concerns), put them in the `.env` file:

```
SOUNDCLOUD_CLIENT_ID=your_client_id
SOUNDCLOUD_CLIENT_SECRET=your_client_secret
SOUNDCLOUD_CALLBACK_URL=your_callback_url
SOUNDCLOUD_USERNAME=your_username
SOUNDCLOUD_PASSWORD=your_password
SOUNDCLOUD_AUTO_CONNECT=false
```

and reference them in `config/services.php` as such:

```
// ...
'soundcloud' => [
    'client_id' => env('SOUNDCLOUD_CLIENT_ID'),
    'client_secret' => env('SOUNDCLOUD_CLIENT_SECRET'),
    'callback_url' => env('SOUNDCLOUD_CALLBACK_URL'),
],
```

### Configuration

[](#configuration)

Besides the ones in `services.php` (which now holds all of your SoundCloud credentials), a few more options are available in the dedicated config file:

- `username` and `password`, both used for connecting to the SoundCloud API as an actual user. These should be defined in the `.env` file.
- `auto_connect`: When set to true, the user credentials above will be used to connect to SoundCloud automatically, without you having the call the `userCredentials` method manually. This may be useful to quickly access data of the authenticated user. Note that, since this option may vary depending of the app evironment (e.g. when running unit tests), it should be defined in the `.env` file as well.

### Usage

[](#usage)

You can access the Soundcloud object through a number of ways:

**Using dependency injection**

In this case, we'll make use of Laravel's IoC container to automatically resolve the binding:

```
namespace App\Http\Controllers;

use Njasm\Soundcloud\SoundcloudFacade;

class HomeController extends Controller
{
    public function index(SoundcloudFacade $soundcloud)
    {
        echo $soundcloud->getAuthUrl();
    }
}
```

**Using the facade**

```
namespace App\Http\Controllers;

use Soundcloud;

class HomeController extends Controller
{
    public function index()
    {
        echo Soundcloud::getAuthUrl();
    }
}
```

**Manually resolving the binding out of the container**

You can either use the full namespace to the `SoundcloudFacade` to reference the binding in the IoC:

```
$soundcloud = $this->app->make(\Njasm\Soundcloud\SoundcloudFacade::class);
$soundcloud = App::make(\Njasm\Soundcloud\SoundcloudFacade::class);
$soundcloud = app(\Njasm\Soundcloud\SoundcloudFacade::class);
```

or use the shorthand alias:

```
$soundcloud = $this->app->make('Soundcloud');
$soundcloud = App::make('Soundcloud');
$soundcloud = app('Soundcloud');
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/60546d05cd76c8b84f92d0081b1bf99471509435804cb15ef48bce067c7891e3?d=identicon)[lucasromanojf](/maintainers/lucasromanojf)

---

Top Contributors

[![lucasromanojf](https://avatars.githubusercontent.com/u/3661610?v=4)](https://github.com/lucasromanojf "lucasromanojf (3 commits)")[![remipelhate](https://avatars.githubusercontent.com/u/3226002?v=4)](https://github.com/remipelhate "remipelhate (3 commits)")[![ashishkadam](https://avatars.githubusercontent.com/u/5616694?v=4)](https://github.com/ashishkadam "ashishkadam (1 commits)")[![lamoni](https://avatars.githubusercontent.com/u/5675626?v=4)](https://github.com/lamoni "lamoni (1 commits)")[![njasm](https://avatars.githubusercontent.com/u/1623137?v=4)](https://github.com/njasm "njasm (1 commits)")[![tylergets](https://avatars.githubusercontent.com/u/9418094?v=4)](https://github.com/tylergets "tylergets (1 commits)")

### Embed Badge

![Health badge](/badges/lucasromanojf-laravel5-soundcloud/health.svg)

```
[![Health](https://phpackages.com/badges/lucasromanojf-laravel5-soundcloud/health.svg)](https://phpackages.com/packages/lucasromanojf-laravel5-soundcloud)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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