Answer the question
In order to leave comments, you need to log in
How to arrange the structure of directories in Eloquent?
At the moment there is such a database structure for the implementation of the directory. It does not imply the storage of nested directories, but this is not so critical at the current stage.
Different types of models may contain reference information that must be collected as model attributes. The binding to models goes through the catalog_values table . The essence of the question is whether it is possible to assemble a model in Eloquent in such a way that it would contain an array of attributes filled from two related tables through the same catalog_values ?
Class Book {
$attributes = [
[
'title' => 'Вес',
'field' => 'г',
'value' => '120'
]
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question