PHPackages                             sanchescom/laravel-rest - 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. [API Development](/categories/api)
4. /
5. sanchescom/laravel-rest

ActiveLibrary[API Development](/categories/api)

sanchescom/laravel-rest
=======================

This library provides tools and interfaces for working with REST API with Models and Collections.

0.1.2(6y ago)41.4k2[1 issues](https://github.com/sanchescom/laravel-rest/issues)[1 PRs](https://github.com/sanchescom/laravel-rest/pulls)GPL-3.0PHPPHP ^7.2

Since Aug 26Pushed 4y agoCompare

[ Source](https://github.com/sanchescom/laravel-rest)[ Packagist](https://packagist.org/packages/sanchescom/laravel-rest)[ RSS](/packages/sanchescom-laravel-rest/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (8)Versions (3)Used By (0)

Laravel Rest
============

[](#laravel-rest)

This library provides tools and interfaces for working with REST API and using Laravel Models and Collections.

Installing
----------

[](#installing)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
$ composer require sanchescom/laravel-rest
```

### Laravel:

[](#laravel)

After updating composer, add the ServiceProvider to the providers array in `config/app.php`

```
'providers' => [
   ...
   Sanchescom\Rest\RestServiceProvider::class,
],
```

### Lumen:

[](#lumen)

After updating composer add the following lines to register provider in `bootstrap/app.php`

```
$app->register(Sanchescom\Rest\RestServiceProvider::class);
```

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

[](#configuration)

Change your default rest api name in `config/rest.php`:

```
'default' => env('REST_CLIENT', 'localhost'),
```

And add a new api configuration:

```
