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.