Download the PHP package thomzee/laramap without Composer

On this page you can find all versions of the php package thomzee/laramap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laramap

SymfonyInsight Latest Stable Version Total Downloads License

Laramap

Introduction

Every laravel API projects need a map to avoid get lost in the response jungle. Laramap is a Laravel package for object or array mapping in order to give a mature REST API response easier and cleaner.

Installation

You can choose one of those two installation methods freely.

1. Automatic Installation

Go into your project root folder laravel

then get the latest version of Laramap on your project with following command.

2. Manual Installation

Alternatively, you can update your composer.json file, just like code below

b. then run composer install command.

Register Service

Firstly you need register the service provider your project configuration file config/app.php

and the facade as well in same file.

Run composer dump-autoload command to update changes in your project configuration file.

Mapper Class Generator

Make sure is exist, and list artisan command with

then generate a mapper file with artisan command, example:

Update the content of single() method. The array keys is attributes of the response and $item is a representation of single object or array, example:

Features

Import the package in above of your controller class.

That's it. That is because you has registered the package in your project configuration file.

1. Paginated Data

Get list of paginated data with pages information. First parameter must be Mapper class you generated before and the second must be instance of Illuminate\Contracts\Pagination\Paginator. You can do where clause and other query builder functions before finally you call the paginate() function here.

the code above, using Mapper the one we create earlier which is class, and the result is like this

2. Single Data

Get single object or array. You can even fill it with a Laravel collection

and the result is like this

3. List Data

Get list data (array data) without paginate the items, with this example code

and the result is something like this.

4. Success Response

Response success meta, with no parameters.

4. Error Response

or and error meta.

5. Response For Validation

Response Laravel Validation errors bag

the result is

License

This package is open-sourced software licensed under the MIT license.


All versions of laramap with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
illuminate/support Version 5.x|6.x|7.x|8.x
illuminate/contracts Version 5.x|6.x|7.x|8.x
illuminate/http Version 5.x|6.x|7.x|8.x
illuminate/database Version 5.x|6.x|7.x|8.x
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package thomzee/laramap contains the following files

Loading the files please wait ....