escuccim / recordcollection by skooch

A package to maintain a searchable database of vinyl records
50
1
2
Package Data
Maintainer Username: skooch
Maintainer Contact: skooch@gmail.com (Eric Scuccimarra)
Package Create Date: 2017-01-19
Package Last Update: 2017-09-26
Language: PHP
License: MIT
Last Refreshed: 2024-03-26 03:11:29
Package Statistics
Total Downloads: 50
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

RecordCollection

Latest Version on Packagist Software License Build Status Total Downloads

A Laravel package to maintain my database of vinyl records in my collection, with a searchable HTML interface and an API interface. Currently has English and French language, easily expandable with additional languages.

Install

Via Composer

$ composer require escuccim/recordcollection

Register service provider in config/app.php:

Escuccim\RecordCollection\RecordCollectionServiceProvider::class
Laracasts\Flash\FlashServiceProvider::class,

Run migrations to create the database table:

php artisan migrate

This uses a middleware to determine if the user is authorized to perform administrative tasks. You can use mine or create your own, the code references middleware 'admin', so unless there is a middleware with this name registered will throw errors. To use mine register it in app/Http/Kernel.php:

'admin' => \Escuccim\RecordCollection\Http\Middleware\AdminMiddleware::class,

To enable some Javascript features you need to add the following to the header of your layouts/app.blade.php file:

<script src="/js/app.js"></script>
@stack('scripts')

And you need to remove the script tag referencing app.js from the bottom of the layout file.

You must publish the config and pagination files with:

php artisan vendor:publish --tag=config

If you wish to edit the language or view files you can also publish those:

php artisan vendor:publish

Note - You must publish the config files for the search interface to work properly. There are some Javascript assets which need to be put into the public directory for the search interface to work, and it will also publish the Laravel pagination files have some slight modifications which are necessary for proper functioning of the page.

There are multiple groups of files to be published, which you can choose by adding --tags=[group] to the command:

  • config - publishes the config file to /config/records.php
  • migrations - publishes the database migrations to /database/migrations
  • lang - publishes the translation files to /resources/lang/vendor - currently I have files for English and French
  • views - publishes the views /resoures/vendor/views

Usage

This package contains its own routes, models, controllers and views so should run out of the box. To enable the Javascript functions in the admin pages you need to add the following to your layouts/app.blade.php in the header:

@yield('header')

Once you have everything installed the route /records should take you to the list of records, where you can add or edit records. I do not have a delete function as I would never get rid of any of my records.

The HTML interface will display a link to discogs and a thumbnail from discogs if you have that info in the database table. If not I wrote scripts I used to pull the info from Discogs, but due to the large numbers of variations of many vinyl releases it usually needs a bit of hand-holding to populate usable data.

In the records.php config file is a key called 'use_rich_cards'. This allows you to display a Rich Card with the record information. The thumbnail from the record will be used as an image if this is on.

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.