PHPackages                             binalogue/nova-spotify-playlist-field - 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. binalogue/nova-spotify-playlist-field

ActivePackage

binalogue/nova-spotify-playlist-field
=====================================

A Spotify playlist field to use in your Laravel Nova apps.

07Vue

Since Mar 22Pushed 7y ago2 watchersCompare

[ Source](https://github.com/binalogue/nova-spotify-playlist-field)[ Packagist](https://packagist.org/packages/binalogue/nova-spotify-playlist-field)[ RSS](/packages/binalogue-nova-spotify-playlist-field/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel Nova Spotify Playlist Field
===================================

[](#laravel-nova-spotify-playlist-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8fe35d20aadbe0e6a27fee9a77e696f43d8b53186efd5682d7add4b3ac256823/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62696e616c6f6775652f6e6f76612d73706f746966792d706c61796c6973742d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binalogue/nova-spotify-playlist-field)[![Build Status](https://camo.githubusercontent.com/ab83ffe23936ac2762eba126395ef1c8fb4bbbd521b9c6445cc0fad8e567c026/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62696e616c6f6775652f6e6f76612d73706f746966792d706c61796c6973742d6669656c642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/binalogue/nova-spotify-playlist-field)[![Quality Score](https://camo.githubusercontent.com/83873576ef748a5e732ce3c2d1f8f4efcc66eb2aac0f366bc65f4cb6c97e14da/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62696e616c6f6775652f6e6f76612d73706f746966792d706c61796c6973742d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/binalogue/nova-spotify-playlist-field)[![Total Downloads](https://camo.githubusercontent.com/83cd5af5444fab8f84bce74e1486e2588d17d8f5e77c1a55cafd66b4f4e06821/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62696e616c6f6775652f6e6f76612d73706f746966792d706c61796c6973742d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/binalogue/nova-spotify-playlist-field)

This [Nova](https://nova.laravel.com/) package adds a Spotify playlist field. Under the hood it uses the [binalogue/laravel-spotify-wrapper](https://github.com/binalogue/laravel-spotify-wrapper) and [binalogue/nova-spotify-auth-tool](https://github.com/binalogue/nova-spotify-auth-tool) packages.

You can add tracks from the [Spotify Web API](https://developer.spotify.com/documentation/web-api/) to your database.

[![Laravel Nova Spotify Playlist Field](./docs/screenshot.png)](./docs/screenshot.png)

Installation
------------

[](#installation)

First, you must install [binalogue/laravel-spotify-wrapper](https://github.com/binalogue/laravel-spotify-wrapper) and [binalogue/nova-spotify-auth-tool](https://github.com/binalogue/nova-spotify-auth-tool) into your Laravel app.

Next, you can install this package via [Composer](https://getcomposer.org/):

```
composer require binalogue/nova-spotify-playlist-field
```

Use
---

[](#use)

Register the field in your resource's `fields` method:

```
/**
 * Get the fields displayed by the resource.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return array
 */
public function fields(Request $request)
{
    return [
        ...
        \Binalogue\SpotifyPlaylistField\SpotifyPlaylistField::make('Name')
            ->spotifyAccessToken()
            ->optionalParameters([
                'id' => 'spotify_id',
                'artist_name' => 'artist',
                'duration_ms' => 'duration_ms',
                'popularity' => 'popularity',
                'preview_url' => 'preview_url',',
            ]),
        ...
    ];
}
```

You must use the following methods:

- `spotifyAccessToken`: to request a Spotify `access token` from the `refresh token` stored in the database (see [binalogue/nova-spotify-auth-tool](https://github.com/binalogue/nova-spotify-auth-tool)).
- `optionalParameters`: a key-value array that indicates which track attributes you would like to store (keys), and the column name in your database where they may be stored (values).

### List of track attributes:

[](#list-of-track-attributes)

- `id`: The Spotify ID for the track.
- `name`: The name of the track.
- `artist_id`: The Spotify ID for the artist.
- `artist_name`: The name of the artist
- `duration_ms`: The track length in milliseconds.
- `popularity`: The popularity of the track. The value will be between 0 and 100, with 100 being the most popular.
- `preview_url`: A link to a 30 second preview (MP3 format) of the track. Can be `null`.
- `first_letter`: The first letter of the track (e.g. in `Tail Lights` will be `T`).

More info in the [Spotify Web API](https://developer.spotify.com/documentation/web-api/reference/tracks/get-track/).

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Mikel Goig](https://github.com/binalogue)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a422aeabf4677b141d6e3918ecdabc73d931290f0697c626bb73708538f0e56b?d=identicon)[binalogue](/maintainers/binalogue)

---

Top Contributors

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

---

Tags

laravelnovapackagespotify

### Embed Badge

![Health badge](/badges/binalogue-nova-spotify-playlist-field/health.svg)

```
[![Health](https://phpackages.com/badges/binalogue-nova-spotify-playlist-field/health.svg)](https://phpackages.com/packages/binalogue-nova-spotify-playlist-field)
```

PHPackages © 2026

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