Announcing Lodata – The OData 4.01 Producer for Laravel!

Available from GitHub: https://github.com/flat3/lodata

And Packagist: https://packagist.org/packages/flat3/lodata

What is OData?

The OData Protocol is an application-level protocol for interacting with data via RESTful interfaces. The protocol supports the description of data models and the editing and querying of data according to those models. It provides facilities for:

  • Metadata: a machine-readable description of the data model exposed by a particular service.
  • Data: sets of data entities and the relationships between them.
  • Querying: requesting that the service perform a set of filtering and other transformations to its data, then return the results.
  • Editing: creating, updating, and deleting data.
  • Operations: invoking custom logic
  • Vocabularies: attaching custom semantics

OData consumer support exists in a wide variety of applications, particularly those from Microsoft, SAP and SalesForce.

If you’re new to OData it is recommended to refer to the description of the Data Model as the terminology used here is OData-specific.

Why OData for Laravel?

Many Laravel applications are used in an agency/customer context that have these kinds of requirements:

  • Our customer wants to access our data using applications such as Excel, PowerBI and Tableau to generate reports and dashboards, but doesn’t like the complexity of logging in and performing manual, error-prone CSV/XLSX downloads to fetch their data
  • Our customer requires authorized third party developers to query our application’s database, possibly modifying the data and running internal functions and we want to manage how these processes work in Laravel
  • Our customer has internal stakeholders (non-expert data users) that need access to different sets of data that we hold, based on their role, but do not need or desire administrative access to our application

Lodata is easy to integrate into existing Laravel projects, provides an out-of-the-box discoverable API for third-party developers and a straightforward data workflow for business users.


  • Hello,
    Do you have some sample on how to use lodata with sql without using eloquent ?

  • hi Chris hope all is well. Thanks for the package. I am new to odata and laravel. i have installed the pkg and it is working fine. i need a dummy guide as to how to integrate the alternative key and also paginate the data if big data

  • Leave a comment