PHPackages                             algo-web/podata-laravel - 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. algo-web/podata-laravel

ActiveLibrary[API Development](/categories/api)

algo-web/podata-laravel
=======================

Expose Odata services from laravel

0.3.6(6y ago)333.2k27[10 issues](https://github.com/Algo-Web/POData-Laravel/issues)[2 PRs](https://github.com/Algo-Web/POData-Laravel/pulls)MITPHPPHP &gt;=5.6.4|^7.0CI failing

Since Nov 3Pushed 5y ago4 watchersCompare

[ Source](https://github.com/Algo-Web/POData-Laravel)[ Packagist](https://packagist.org/packages/algo-web/podata-laravel)[ RSS](/packages/algo-web-podata-laravel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (13)Versions (16)Used By (0)

[![Build Status](https://camo.githubusercontent.com/99f6d6793986e95d81f07d788d7b68808890ef0447903b048803b87b06f5e8ae/68747470733a2f2f7472617669732d63692e6f72672f416c676f2d5765622f504f446174612d4c61726176656c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Algo-Web/POData-Laravel)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ba46f2bebf32a2a65a12e6adeba5d5619375082890bea2fc3f51eea6e3795b34/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f416c676f2d5765622f504f446174612d4c61726176656c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Algo-Web/POData-Laravel/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/9f2b8c991a29769b4cfe288fcaabcc9f3066c37e12186ba609e296536ea0f00e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f416c676f2d5765622f504f446174612d4c61726176656c2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Algo-Web/POData-Laravel?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/d677f1cee05242c7f2d98c02cb357c34d64b75cfc9c3559d015bb17085741d78/68747470733a2f2f706f7365722e707567782e6f72672f616c676f2d7765622f706f646174612d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/algo-web/podata-laravel)[![Latest Unstable Version](https://camo.githubusercontent.com/b0f02954295a1779586fc2682092c18002a39806902f156804dadb396c681982/68747470733a2f2f706f7365722e707567782e6f72672f616c676f2d7765622f706f646174612d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/algo-web/podata-laravel)[![Total Downloads](https://camo.githubusercontent.com/44d609d44019ef9a585901c24dab151608bcfe823ce712a806274d92e8a258f5/68747470733a2f2f706f7365722e707567782e6f72672f616c676f2d7765622f706f646174612d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/algo-web/podata-laravel)[![Monthly Downloads](https://camo.githubusercontent.com/8eb30d5af2759eac223bc3a7ac818bf4db243d3cfca7d0e47d12054965e9e7f1/68747470733a2f2f706f7365722e707567782e6f72672f616c676f2d7765622f706f646174612d6c61726176656c2f642f6d6f6e74686c79)](https://packagist.org/packages/algo-web/podata-laravel)[![Daily Downloads](https://camo.githubusercontent.com/6c4c9118c31bf26f1572bcfd75401c73eca9d655c859d5a50e67f743e1a3cccc/68747470733a2f2f706f7365722e707567782e6f72672f616c676f2d7765622f706f646174612d6c61726176656c2f642f6461696c79)](https://packagist.org/packages/algo-web/podata-laravel)

POData-Laravel
==============

[](#podata-laravel)

Composer Package to provide Odata functionality to Laravel

- PHP 5.6 support has been dropped \*

To install, run

```
composer require algo-web/podata-laravel

```

Edit `config/app.php` and add this to providers section:

```
AlgoWeb\PODataLaravel\Providers\MetadataProvider::class,
AlgoWeb\PODataLaravel\Providers\MetadataRouteProvider::class,
AlgoWeb\PODataLaravel\Providers\QueryProvider::class,
AlgoWeb\PODataLaravel\Providers\MetadataControllerProvider::class,
```

You then add the trait to the models you want to expose.

```
    use \AlgoWeb\PODataLaravel\Models\MetadataTrait;
```

By default, following Laravel convention, POData-Laravel pluralises the model names to use as endpoints. That's an implementation choice in POData-Laravel, not anything intrinsic to OData itself.

Eg, for User model, all else equal:

```
    /odata.svc/Users
```

If you have just installed the package and have trouble reaching your models' endpoints, try setting APP\_DISABLE\_AUTH=true in your project's .env file temporarily, and then try reaching those endpoints again.

\-- Known Limitations --

- Cannot expose two models with the same class name in different namespaces - trying to expose both App\\Foo\\Model and App\\Bar\\Model will trip an exception complaining that resource set has already been added.
- This can be worked around by setting a custom endpoint name on one of the colliding models.
- Controller input parameters map 'id' to underlying model's primary key
- Assumes autoloader has been optimised with composer -o dump-autoload.

\-- Configuration options -- These need to go in your Laravel project's .env file.

- APP\_METADATA\_CACHING - Whether or not to turn model metadata caching on
- APP\_METADATA\_CACHE\_DURATION - If caching, how long (in minutes) to retain cached metadata
- APP\_DISABLE\_AUTH - Disable authentication (boolean)
- APP\_DRY\_RUN - Roll back DB changes unconditionally (boolean)

Contributing
------------

[](#contributing)

See CONTRIBUTING.md for the details.

Features Supported
------------------

[](#features-supported)

(thanks to @renanwilliam for the initial version of this list)

- Full CRUD Support
- $count
- $filter
    - Comparison Operators
        - eq
        - ne
        - lt
        - le
        - gt
        - ge
    - Logical Operators
        - and
        - or
        - not
    - Comparison Operators
        - has
    - String Functions
        - indexof
        - contains
        - endswith
        - startswith
        - length
        - substring
        - tolower
        - toupper
        - trim
        - concat
    - Arithmetic Operators
        - add
        - sub
        - mul
        - div
        - mod
    - Date Functions
        - year
        - month
        - day
        - hour
        - minute
        - second
        - fractionalseconds
        - date
        - time
        - totaloffsetminutes
        - now
        - mindatetime
        - maxdatetime
    - Math Functions
        - round
        - floor
        - ceiling
- $select
- $top
- $skip
- $skiptoken
- $orderby
- $expand

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~92 days

Recently: every ~207 days

Total

14

Last Release

2272d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.6.4

0.3.6PHP &gt;=5.6.4|^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/20731303a5091fd834c29c680e8298780d42813289b7900d9389f1fc042ac081?d=identicon)[c-harris](/maintainers/c-harris)

---

Top Contributors

[![CyberiaResurrection](https://avatars.githubusercontent.com/u/9083866?v=4)](https://github.com/CyberiaResurrection "CyberiaResurrection (949 commits)")[![c-harris](https://avatars.githubusercontent.com/u/16450074?v=4)](https://github.com/c-harris "c-harris (324 commits)")[![renanwilliam](https://avatars.githubusercontent.com/u/19995615?v=4)](https://github.com/renanwilliam "renanwilliam (6 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (4 commits)")[![NoelDeMartin](https://avatars.githubusercontent.com/u/1517677?v=4)](https://github.com/NoelDeMartin "NoelDeMartin (1 commits)")

---

Tags

laravelservicesodatapodata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/algo-web-podata-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/algo-web-podata-laravel/health.svg)](https://phpackages.com/packages/algo-web-podata-laravel)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[tailflow/laravel-orion

Orion for Laravel allows you to build a fully featured REST API based on your Eloquent models and relationships with the simplicity of Laravel as you love it.

1.6k627.7k9](/packages/tailflow-laravel-orion)[flat3/lodata

OData v4.01 Producer for Laravel

96320.9k](/packages/flat3-lodata)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
