PHPackages                             nestermaks/laravel-pricelist - 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. nestermaks/laravel-pricelist

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

nestermaks/laravel-pricelist
============================

Multilingual pricelist package for Laravel with migrations and API controllers

1.0.0(4y ago)06MITPHPPHP ^8.0

Since Jun 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nestermaks/laravel-pricelist)[ Packagist](https://packagist.org/packages/nestermaks/laravel-pricelist)[ Docs](https://github.com/nestermaks/laravel-pricelist)[ GitHub Sponsors](https://github.com/nestermaks)[ RSS](/packages/nestermaks-laravel-pricelist/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

Multilingual pricelist package for Laravel with migrations and API controllers
==============================================================================

[](#multilingual-pricelist-package-for-laravel-with-migrations-and-api-controllers)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b8f879833d7d6aee55d24ec13ab600c3872006ec6474e9af764ef3967319f6e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65737465726d616b732f6c61726176656c2d70726963656c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nestermaks/laravel-pricelist)[![GitHub Tests Action Status](https://camo.githubusercontent.com/b14f66e9f2320653065ad1c221fbaf24a389e5a22567d231f529715703e7d3b7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e65737465726d616b732f6c61726176656c2d70726963656c6973742f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/nestermaks/laravel-pricelist/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/80c1d5d9b14fbaaaf21ad3fbae882da386e2401081c895a809574224ddf0cb4d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6e65737465726d616b732f6c61726176656c2d70726963656c6973742f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/nestermaks/laravel-pricelist/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/77d5dc2f437e602b647afc4b41c5d41c71994c9e50f041223f8b42283a985ef0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65737465726d616b732f6c61726176656c2d70726963656c6973742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nestermaks/laravel-pricelist)

This package allows you to manage your pricelists and reorder items inside. It's not a kind of pricing tables, where you have a list of features and a price below. It is responsible for creating lists, where every item has its own price. Also every item can belong to many pricelists.

This package includes:

1. Models
2. Migrations
3. Api routes
4. Api controllers
5. Translations
6. Config file

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Database](#database)
- [Usage](#usage)
    - [Registering models](#registering-models)
    - [Associating pricelists](#associating-pricelists)
    - [Show pricelists and pricelist items](#show-pricelists-and-pricelist-items)
    - [Attach and detach pricelist items to pricelist](#attach-and-detach-pricelist-items-to-pricelist)
    - [Reordering pricelist items within the pricelist](#reordering-pricelist-items-within-the-pricelist)
- [Api Routes](#api-routes)
    - [CRUDS](#cruds)
        - [Pricelists](#pricelists)
        - [Pricelist items](#pricelist-items)
    - [Attach and detach pricelists from pricelist items](#attach-and-detach-pricelists-from-pricelist-items)
    - [Associate pricelist with your model](#associate-pricelist-with-your-model)
    - [Change pricelist item order within a pricelist](#change-pricelist-item-order-within-a-pricelist)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Security vulnerabilities](#security-vulnerabilities)
- [Credits](#credits)

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

[](#installation)

You can install the package via composer:

```
composer require nestermaks/laravel-pricelist
```

Publish and run the migrations with:

```
php artisan vendor:publish --tag=pricelist-migrations
php artisan migrate
```

Configuration
-------------

[](#configuration)

You can override translation files of add a new one. Publish lang files with:

```
php artisan vendor:publish --tag=pricelist-translations
```

You can override the default options for used locales, api route prefixes and validation rules. Publish the configuration:

```
php artisan vendor:publish --tag=pricelist-config
```

This is the contents of the published config file:

```
