V
V
Vyacheslav Shevchenko2019-12-02 17:23:08
Laravel
Vyacheslav Shevchenko, 2019-12-02 17:23:08

Is there a generic entity constructor for Laravel?

Hello.
There is some package for laravel in which it would be possible to create an entity of type news and prescribe the necessary fields such as date, name, code, and so on, and then, for example, make another entity, such as project, and prescribe other fields.
Well, in the database, all this would be stored in tables like: entity - entity, entity_properties - entity properties, entity_properties_element_value - property values ​​for elements, entity_elements - for the elements themselves, i.e. news and projects
If you are familiar with Bitrix, then I would like to make something like infoblocks, but more lightweight.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Kulaxyz, 2019-12-02
@WebDev2030

https://github.com/sunel/eav

R
rPman, 2019-12-03
@rPman

Don't do it like this, master the dynamic creation of tables and fields in the database, it's easy. What difference does it make what you write in the button code 'insert into entities ...' or 'create table / add field'? But the final performance you will have is maximum and the tools for working with data are native.
There will be problems at most - with partial backup / restore, setting up replication and the complexity of supporting clients with different versions (on the web this is almost not relevant, except for highly loaded high availability sites)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question