Open janareit opened 9 years ago
Same question also when mass assigning from array? It would be nice if I could pass my scopes array to BuildTree method.
Just to avoid adding keys to every line in array...
$categories = [
['family_id' => 1, 'name' => 'Category', 'children' => [
['family_id' => 1, 'name' => 'Category2', 'children' => [
['family_id' => 1, 'name' => 'Category3', 'children' => [
['family_id' => 1, 'name' => 'Category4'],
['family_id' => 1, 'name' => 'Category5'],
]],
]],
]],
];
Possibly related to or the same as #68
Not sure if this project is alive though.. @etrepat?
Hey! Is there a way to set this 'company_id' only once when building from array?
Seems a bit annoying to duplicate it to every array element when mass assigning with
Category::buildTree($categories)