Download the PHP package tychovbh/laravel-resource-mapper without Composer
On this page you can find all versions of the php package tychovbh/laravel-resource-mapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tychovbh/laravel-resource-mapper
More information about tychovbh/laravel-resource-mapper
Files in tychovbh/laravel-resource-mapper
Package laravel-resource-mapper
Short Description Map data from external Resources in Laravel
License MIT
Homepage https://github.com/tychovbh/laravel-resource-mapper
Informations about the package laravel-resource-mapper
laravel-resource-mapper
Laravel Resource Mapper is created by, and is maintained by Tycho, and is a Laravel/Lumen package to map data from external Resources. Feel free to check out the contribution guidelines
Install
Laravel Resource Mapper requires PHP 7.1 or 7.2. This particular version supports Laravel 5.5 - 5.7 only and Lumen.
To get the latest version, simply require the project using Composer.
Once installed, if you are not using automatic package discovery, then you need to register the Tychovbh\ResourceMapper\ResourceMapperServiceProvider
service provider in your config/app.php
.
In Lumen add de Service Provider in bootstrap/app.php
:
Configuration
Laravel Resource Mapper has mapping configuration.
To get started, you'll can publish all vendor assets:
This will create a config/resource-mapper.php
file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.
In lumen you have to create the configuration file manually since vendor:publish
is not available. Create the file config/resource-mapper.php
and copy paste the example file.
You can add as many mappings as you wish give them a name that looks like your API endpoint: ``
Usage
Real Examples
Instantiate ResourceMapper class:
Available ResourceMapper methods:
Available RawResource methods:
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-resource-mapper with dependencies
illuminate/contracts Version ~5.6.0|~5.7.0|~5.8.0|~5.9.0
illuminate/support Version ~5.6.0|~5.7.0|~5.8.0|~5.9.0
ext-json Version *