Download the PHP package woweb/laravel-openproduct without Composer
On this page you can find all versions of the php package woweb/laravel-openproduct. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download woweb/laravel-openproduct
More information about woweb/laravel-openproduct
Files in woweb/laravel-openproduct
Package laravel-openproduct
Short Description Laravel wrapper voor de Open Product API
License EUPL-1.2
Homepage https://github.com/WowebNL/laravel-openproduct
Informations about the package laravel-openproduct
laravel-openproduct
Laravel wrapper for the Product API and Producttypes API based on Open Product.
Supported API versions
| API | Version |
|---|---|
| Producten API | v1.4.0 |
| Producttypen API | v1.4.0 |
Requirements
- PHP 8.2 or higher
- Laravel 10, 11, or 12
Installation
The service provider is registered automatically via Laravel's package auto-discovery.
Publish the configuration:
Configuration
Add the following variables to your .env:
OPENPRODUCT_LANGUAGE sets the Accept-Language header on every API request. Defaults to nl.
Upgrading from v1.x
Method names were changed in v2 to be consistent across all classes. Update your call sites:
| Old (v1) | New (v2) |
|---|---|
Producten::getAllProducten() |
Producten::list() |
Producten::getSingleProduct($uuid) |
Producten::get($uuid) |
Producten::createProduct($data) |
Producten::create($data) |
Producten::updateProduct($uuid, $data) |
Producten::patch($uuid, $data) |
ProductTypen::getAllProducttypes() |
ProductTypen::list() |
ProductTypen::getSingleProducttype($uuid) |
ProductTypen::get($uuid) |
ProductTypen::updateProducttype($uuid, $data) |
ProductTypen::patch($uuid, $data) |
Usage
All classes throw OpenProductValidationException for invalid input before the API call is made, and OpenProductException for HTTP errors returned by the API.
Error handling
Producten
Endpoint: producten/api/v1/producten
Valid values for status: initieel, in_aanvraag, gereed, actief, ingetrokken, geweigerd, verlopen.
Valid values for frequentie: eenmalig, maandelijks, jaarlijks.
ProductTypen
Endpoint: producttypen/api/v1/producttypen
Valid values for doelgroep: burgers, bedrijven, burgers_en_bedrijven.
code must match the pattern ^[A-Z0-9-]+$.
Themas
Endpoint: producttypen/api/v1/themas
Content
Endpoint: producttypen/api/v1/content
ContentLabels
Endpoint: producttypen/api/v1/contentlabels (read-only)
Prijzen
Endpoint: producttypen/api/v1/prijzen
Schemas
Endpoint: producttypen/api/v1/schemas
Note: schemas use an integer $id, not a UUID.
Links
Endpoint: producttypen/api/v1/links
Bestanden
Endpoint: producttypen/api/v1/bestanden
File uploads use multipart form data automatically.
Acties
Endpoint: producttypen/api/v1/acties
Locaties
Endpoint: producttypen/api/v1/locaties
postcode must match the Dutch format ^[1-9][0-9]{3}\s?[A-Za-z]{2}$ (e.g. 6511 PS or 6511PS).
Organisaties
Endpoint: producttypen/api/v1/organisaties
Contacten
Endpoint: producttypen/api/v1/contacten
Testing
License
EUPL-1.2. See LICENSE for details.
All versions of laravel-openproduct with dependencies
guzzlehttp/guzzle Version ^7.2
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/validation Version ^10.0|^11.0|^12.0
orchestra/testbench Version ^10.0