I have a little problem with laravel. this is my database :
I need a array like this :
array(x) {
[22] array(2) {
array ( ["id"] => 16, ["name"] => Charente),
array ( ["id"] => 17, ["name"] => Charent-Maritime),
}
[21] array(1) {
array ( ["id"] => 1, ["name"] => Ain),
}
...
}
This is an array, where for each region, we have the list of department belonging to the region.
What is the syntax to get this ? Actually i use this :
return $this->model
->select('id', 'name', 'id_region')->get();
But this is not what i want x)
Sorry for my bad english. And thank you by advance.
