| Package Data | |
|---|---|
| Maintainer Username: | c-harris |
| Package Create Date: | 2016-10-30 |
| Package Last Update: | 2020-06-01 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-23 15:05:29 |
| Package Statistics | |
|---|---|
| Total Downloads: | 3,191 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 33 |
| Total Watchers: | 4 |
| Total Forks: | 28 |
| Total Open Issues: | 12 |
Composer Package to provide Odata functionality to Laravel
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 --
-- Configuration options -- These need to go in your Laravel project's .env file.
See CONTRIBUTING.md for the details.
(thanks to @renanwilliam for the initial version of this list)
The capabilities under $filter currently rely on the deprecated-in-PHP-7.2 create_function capability.