PHPackages                             soda-framework/spotify - 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. [Framework](/categories/framework)
4. /
5. soda-framework/spotify

ActiveLibrary[Framework](/categories/framework)

soda-framework/spotify
======================

A sweet Spotify suite built on Soda CMS

1.1.3(7y ago)02.3kMITPHPPHP ^7.0

Since Aug 30Pushed 7y ago2 watchersCompare

[ Source](https://github.com/soda-framework/spotify)[ Packagist](https://packagist.org/packages/soda-framework/spotify)[ Docs](https://github.com/soda-framework/spotify)[ RSS](/packages/soda-framework-spotify/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (6)Versions (23)Used By (0)

Soda Spotify
============

[](#soda-spotify)

A sweet spotify platform for Made in Katana

\##Installation

1. Firstly follow the instructions to install Soda CMS at:
2. Install Soda Spotify

```
#!json
composer require soda-framework/spotify

```

3. Install these packages using NPM. These are needed for compiling the Vue Components in this package.

```
"vue-template-es2015-compiler": "1.3.1",
"vue": "^2.1.10",
"vue-template-compiler": "^2.1.10"
"axios": ""

```

4. Integrate Soda Spotify into laravel by adding `Soda\Spotify\Providers\SpotifyServiceProvider::class`in the providers array in `/config/app.php`

```
    'providers' => [
        Soda\Providers\SodaServiceProvider::class,
        Soda\Spotify\Providers\SpotifyServiceProvider::class,
    ]

```

5. Run the database migrations `php artisan migrate` to generate the necessary tables.
6. In the CMS, go to the Spotify &gt; Settings tab and specify the *Package* and *Action* that each created playlist should use. You can also specify the Playlist Title and Playlist Image (optional) for a playlist created on a user account.

\##Usage

\###Saving a Playlist Include this file to create a link that will create a playlist on a users account.

```
#!php
@include('soda-spotify::save',compact('playlist'))

```

Or, you can pass in custom text/views/html to be displayed.

```
#!php
@include('soda-spotify::save',['playlist'=>$playlist, 'save_text'=>'Save Playlist', 'saved_text'=>'Playlist Saved'])

```

You can specify the Title and Image the created playlist will have by going to the Spotify &gt; Settings tab and in the cms and editing the Playlist Title and Playlist Image (optional).

This action will send them to Spotify and log them in. They will be sent back to the /playlist/ID page with

```
#!php
$_GET['from_spotify']

```

present.

If this parameter is present AND the playlist has not already been listed as added (session), then it will add the playlist to the users account before sending them back to the playlist on the site.

\###Tracks You need to include the Tracks component in your Javascript using Vue. e.g.

```
#!js
var Vue = require('vue');
var Tracks = require('../../../../../vendor/mik/spotify/resources/js/Components/Tracks.vue'); // path to the Tracks component
require('../vueConfig.js');

if( $('#playlist').length ) {
    var playlist_vm = new Vue({
        el: '#playlist',
        data: {
            token: document.head.querySelector("[name=csrf-token]").content,
        },
        created: function(){
            var me = this;
        },
        methods: {

        },
        components: {
            Tracks
        }
    });
}

```

Displaying the Player Interface

```
#!php
@include('soda-spotify::tracks',compact('playlist'))

```

Or, you can pass in custom text act act as a title. e.g.

```
#!php
@include('soda-spotify::tracks',['playlist'=>$playlist, 'title'=>'Now Playing'])

```

\#Routes ###Save Playlist

```
#!php
route('spotify.login',['url'=>URL_TO_RETURN_AFTER_LOGIN])

```

\###Get Playlist Tracks

```
#!php
route('spotify.api.tracks',['id'=>PLAYLIST_ID])

```

Response [![Screen Shot 2017-02-01 at 11.55.19 am.png](https://camo.githubusercontent.com/3e2bba110216f38082d872e01f28abba267fff2492afec5849f05bc9dee7fef0/68747470733a2f2f6269746275636b65742e6f72672f7265706f2f4241624c65412f696d616765732f333734313634323037392d53637265656e25323053686f74253230323031372d30322d3031253230617425323031312e35352e3139253230616d2e706e67)](https://camo.githubusercontent.com/3e2bba110216f38082d872e01f28abba267fff2492afec5849f05bc9dee7fef0/68747470733a2f2f6269746275636b65742e6f72672f7265706f2f4241624c65412f696d616765732f333734313634323037392d53637265656e25323053686f74253230323031372d30322d3031253230617425323031312e35352e3139253230616d2e706e67)

\#Storing Track Data

\###Tracks need to be stored in the database in the JSON with the structure:

```
#!json

[{
    "id": "12D0n7hKpPcjuUpcbAKjjr",
    "name": "Don't Like.1",
    "preview_url": "https:\/\/p.scdn.co\/mp3-preview\/fef716a78bda6c3ce06f3a7b12d4ad5e47035984?cid=da37dbff0615468591361d57d2118b05",
    "uri": "spotify:track:12D0n7hKpPcjuUpcbAKjjr",
    "url": "https:\/\/open.spotify.com\/track\/12D0n7hKpPcjuUpcbAKjjr",
    "artists": [{
        "id": "5K4W6rqBFWDnAN6FQUkS6x",
        "name": "Kanye West",
        "uri": "spotify:artist:5K4W6rqBFWDnAN6FQUkS6x",
        "url": "https:\/\/open.spotify.com\/artist\/5K4W6rqBFWDnAN6FQUkS6x"
    }, {
        "id": "15iVAtD3s3FsQR4w1v6M0P",
        "name": "Chief Keef",
        "uri": "spotify:artist:15iVAtD3s3FsQR4w1v6M0P",
        "url": "https:\/\/open.spotify.com\/artist\/15iVAtD3s3FsQR4w1v6M0P"
    }],
}]

```

*There is a function to convert an array of Spotify Created tracks JSON to this format*

```
#!php
Soda\Spotify\Components\Helpers::reduceResults($tracks); // $tracks is an array of Spotify Created track objects

```

\###Creating a Playlist

```
#!php
$playlist = \Soda\Spotify\Controllers\PlaylistController::create_seeded_playlist($seeds);

```

$seeds is an array of seeds as defined in .

e.g.

```
#!php
$seeds = [
    'target_valence'=>0.5,
    'seed_tracks'=>ARRAY_OF_SPOTIFY_TRACK_IDS
];

```

**Important**: You MUST have any one of *seed\_genres*, *seed\_tracks* or *seed\_artists*.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~17 days

Recently: every ~36 days

Total

22

Last Release

2820d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e5c6a191b1ac6657212caf234f305b0e39246ef2102916bf0d2dc0a61242609?d=identicon)[Chaddles23](/maintainers/Chaddles23)

---

Top Contributors

[![Chaddles23](https://avatars.githubusercontent.com/u/9097402?v=4)](https://github.com/Chaddles23 "Chaddles23 (4 commits)")

---

Tags

frameworkspotifySODAsoda-framework

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/soda-framework-spotify/health.svg)

```
[![Health](https://phpackages.com/badges/soda-framework-spotify/health.svg)](https://phpackages.com/packages/soda-framework-spotify)
```

###  Alternatives

[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)

PHPackages © 2026

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