|
|
@@ -410,7 +410,7 @@ class Member extends Component
|
|
|
{
|
|
|
foreach ($records as $record) {
|
|
|
// $this->categories[] = array('id' => $record->id, 'name' => str_repeat(" / ", $indentation) . $record->name);
|
|
|
- $this->categories[] = array('id' => $record->id, 'name' => $record->getTree());
|
|
|
+ $this->categories[] = array('id' => $record->id, 'name' => $record->getTree(), 'indentation' => $indentation);
|
|
|
if (count($record->childs))
|
|
|
$this->getCategories($record->childs, $indentation + 1);
|
|
|
}
|
|
|
@@ -454,7 +454,7 @@ class Member extends Component
|
|
|
|
|
|
$this->categories = array();
|
|
|
|
|
|
- $this->getCategories(\App\Models\Category::select('id', 'name')->where('parent_id', null)->get(), 0);
|
|
|
+ $this->getCategories(\App\Models\Category::select('id', 'name')->where('parent_id', null)->orderBy('name')->get(), 0);
|
|
|
|
|
|
$this->courses = \App\Models\Course::select('id', 'name')->where('enabled', null)->get();
|
|
|
|