PHPackages                             sriccio/laravel-discogs - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sriccio/laravel-discogs

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sriccio/laravel-discogs
=======================

An easy to use Laravel-Discogs package.

00

Since Nov 26Pushed 5y agoCompare

[ Source](https://github.com/LokiThor2021/laravel-discogs)[ Packagist](https://packagist.org/packages/sriccio/laravel-discogs)[ RSS](/packages/sriccio-laravel-discogs/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

A easy to use Laravel-Discogs package.
======================================

[](#a-easy-to-use-laravel-discogs-package)

[![Latest Version on Packagist](https://camo.githubusercontent.com/624833089b9fd1d1d3ed04362025f87a7606abe37a4d82013c50a5aae8eaf5ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6c6974616772617a7974652f6c61726176656c2d646973636f67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolitagrazyte/laravel-discogs)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/98f52db68d3fffd026d2249198d989fb12b029729371c7beaf51a523dcb0a3a2/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4a6f6c6974614772617a7974652f6c61726176656c2d646973636f67732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/JolitaGrazyte/laravel-discogs)[![SensioLabsInsight](https://camo.githubusercontent.com/cab240abc40a712dfce9f831c46aac3c8b2ff28b2e5b1838f64299c886965c81/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f66316333333330652d633731362d343231652d613330312d3033616430393363636263382e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/f1c3330e-c716-421e-a301-03ad093ccbc8)[![Quality Score](https://camo.githubusercontent.com/89964286d78dbb13d8191f399a7d02bcea707fc329021925825b9d0cd87e83af/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4a6f6c6974614772617a7974652f6c61726176656c2d646973636f67732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/JolitaGrazyte/laravel-discogs)[![Total Downloads](https://camo.githubusercontent.com/4e5724e27d4589d37cbf3ec494c28cfb2b82effa037d36b21bc8626fe6980d46/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f6c6974616772617a7974652f6c61726176656c2d646973636f67732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolitagrazyte/laravel-discogs)

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

[](#installation)

You can install the package via composer:

```
composer require jolitagrazyte/laravel-discogs
```

Post-installation
-----------------

[](#post-installation)

You must set the service provider of this package in your application file.

```
// config/app.php
'provider' => [
    ...
    Jolita\LaravelDiscogs\DiscogsServiceProvider::class,
    ...
];
```

This package also comes with a facade, which provides an easy way to call the the class.

```
// config/app.php
'aliases' => [
    ...
    'Discogs' => Jolita\LaravelDiscogs\DiscogsFacade::class,
    ...
];
```

Next up, you must publish the config file of this package with this command:

```
php artisan vendor:publish --provider="Jolita\LaravelDiscogs\DiscogsServiceProvider"
```

The following config file will be published in config/laravel-discogs.php

Some of the endpoints require authentication.

If you want to use one of those you must set your token.

```
/*
 * Token is your discogs token that you can obtain on https://www.discogs.com/settings/developers page.
 * User-Agent is a name of your application, for example 'MyAmazingDiscogsApp/1.0'.
 *
 */
return [
    'token' => env('DISCOGS_TOKEN', ''),
    'headers' => [
        'User-Agent' => '',
    ],
];
```

Usage
-----

[](#usage)

Usage of this package is really simple.

For the most of the endpoints there is a method.

Optionally you can also use the get()-method.

### Endpoints with no authentication required

[](#endpoints-with-no-authentication-required)

```
// Get artist where id is 1.
$artist = Discogs::artist('1');

// Request all the relases of the artist where id is 1.
$artistRelease = Discogs::artistRelease('1');

// Get label where id is 1.
$label = Discogs::label('1');

// Request all the relases of the label where id is 1.
$labelRelease = Discogs::labelRelease('1');

// Get relase where id is 1.
$release = Discogs::release('1');

// Get listing where id is 1234.
$listing = Discogs::getMarketplaceListing('1234')
```

#### Inventory not authenticated

[](#inventory-not-authenticated)

If you are not authenticated as the inventory owner, only items that have a status of For Sale will be visible.

```
// Get inventory where username is username.
$inventory = Discogs::getUsersInventory('username')
```

### Endpoints where authentication is required

[](#endpoints-where-authentication-is-required)

For the endpoints where authentication is required you must make sure that you have a token placed in your .env file or straight in the configuration file: config/laravel-discogs.php .

#### Orders

[](#orders)

```
$myOrders = Discogs::getMyOrders();

// Get order with id 1234
$order = Discogs::orderWithId('1234');

// Get messages of the order with id 1234
$orderMessages = Discogs::orderMessages('1234')
```

#### Search

[](#search)

If you want to add some extra search parameters you can do it by first creating a SearchParameters object and then chaining as many options as you want.

```
// create a SearchParameters object
$searchParameters = new SearchParameters();

//chain some search paramater
$searchParameters->type('label')->format('lp')->year('1996');

//do a search request with query = 'MoWax' and passing the SearchParameters object
$searchResult = Discogs::search('MoWax', $searchParameters);
```

#### Inventory

[](#inventory)

When requesting your own inventory you also must authenticate.

As the inventory owner you will get additional weight, format\_quantity, external\_id, and location keys.

```
// Get inventory where username is username.
$inventory = Discogs::getUsersInventory('username')
```

Changelog
---------

[](#changelog)

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

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

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

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Jolita Grazyte](https://github.com/JolitaGrazyte)
- [All Contributors](../../contributors)

About Spatie
------------

[](#about-spatie)

Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects [on our website](https://spatie.be/opensource).

License
-------

[](#license)

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

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 69% 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/64dd923638d70842ebf918f801babf21e259f763ecbbf8d1ec9df06bb102fe03?d=identicon)[LokiThor2021](/maintainers/LokiThor2021)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (29 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (7 commits)")[![sriccio](https://avatars.githubusercontent.com/u/5239282?v=4)](https://github.com/sriccio "sriccio (6 commits)")

### Embed Badge

![Health badge](/badges/sriccio-laravel-discogs/health.svg)

```
[![Health](https://phpackages.com/badges/sriccio-laravel-discogs/health.svg)](https://phpackages.com/packages/sriccio-laravel-discogs)
```

PHPackages © 2026

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