A
A
Abc Edc2016-01-19 16:22:59
MySQL
Abc Edc, 2016-01-19 16:22:59

How to organize this in Laravel?

I need to write to the table
entity entity_id user_id
And for this we first load the list of entities (table names), and then, depending on the selected entity, we get the records. Is there anything more reasonable than

$map=[
'some_entity'=>'App\Some',
'some_entity2'=>'App\Some2'
];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
D', 2016-01-19
@gleber1

It is not clear what is required. Are you talking about polymorphic relationships ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question