laravel-enso / enso

Laravel Vue SPA, Bulma themed. For demo login use `admin@laravel-enso.com` & `password` -
https://www.laravel-enso.com
MIT License
1.08k stars 277 forks source link

Question - postgrest #375

Closed pongraczi closed 3 years ago

pongraczi commented 3 years ago

This is a Question.

PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API.

In short, postgrest could provide json responses using an extremely simple method, like this:

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'http://192.168.0.101:3000/view_students_v1?studentid=eq.'.$id);
$result = curl_exec($ch);
$pack=json_decode($result,true);

where $pack is an array with rows and really easy to access for the data.

My question: is that possible to use enso framework to be able to build complex forms, where the data source is a json or php array and not direct database tables?

My first hint, the developer should rewrite completely the queries, for example in case of the table:
https://docs.laravel-enso.com/backend/tables.html#the-name-attribute-and-nested-properties
https://docs.laravel-enso.com/backend/tables.html#the-query

So, in short, data source for building forms (tables etc.) could be direct json data without any DB classes. Do you think, it is possible? Thanks.

aocneanu commented 3 years ago

I guess anything is possible in theory, but for sure we did not do any concrete step towards this.