Skip to content

Composer Package to provide Odata functionality to Laravel

License

Notifications You must be signed in to change notification settings

Algo-Web/POData-Laravel

Repository files navigation

Build Status Scrutinizer Code Quality Coverage Status Latest Stable Version Latest Unstable Version Total Downloads Monthly Downloads Daily Downloads

POData-Laravel

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\QueryProvider::class,

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

    use \AlgoWeb\PODataLaravel\Models\MetadataTrait;

-- 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.