PHPackages                             daniesy/rodels - 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. [Database &amp; ORM](/categories/database)
4. /
5. daniesy/rodels

ActiveLibrary[Database &amp; ORM](/categories/database)

daniesy/rodels
==============

Remote models for Laravel

1.0.19(2mo ago)11.4k1[3 PRs](https://github.com/daniesy/rodels/pulls)PHPPHP ^8.3CI passing

Since Mar 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/daniesy/rodels)[ Packagist](https://packagist.org/packages/daniesy/rodels)[ RSS](/packages/daniesy-rodels/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (24)Used By (0)

Rodels
======

[](#rodels)

Remote models for Laravel.

Getting Started
---------------

[](#getting-started)

Follow these instructions to get Rodels up and running in your Laravel project.

### Prerequisites

[](#prerequisites)

You need **Composer** installed on your machine, but since you're already using Laravel, I guess you can skip this step.

### Installing

[](#installing)

Begin by installing this package through Composer.

```
composer require daniesy/rodels
```

### Laravel Users

[](#laravel-users)

For Laravel users, there is a service provider you can make use of to automatically register the necessary bindings.

> Laravel 5.5+ users: this step may be skipped, as we can auto-register the package with the framework.

```
// config/app.php
'providers' => [
	'...',
	Daniesy\Rodels\RodelsServiceProvider::class
],

'aliases' => [
	'...',
	'Remote' => \Daniesy\Rodels\Facade\Remote::class,
],
```

When this provider is booted, you'll gain access to a helpful `Remote` facade, which you may use in your controllers.

```
public function index()
{
	$users = Remote::users()->list();
	return response()->json($users);
}
```

> In Laravel 5, of course add `use Remote;` to the top of your controller.

### Defaults

[](#defaults)

If using Laravel, there are only two configuration options that you'll need to worry about. First, publish the default configuration

```
php artisan vendor:publish

// Or...

php artisan vendor:publish --provider="Daniesy\Rodels\RodelsServiceProvider"
```

This will add a new configuration file to: `config/rodels.php`.

```
