-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidebarComposer.php
More file actions
69 lines (58 loc) · 1.6 KB
/
SidebarComposer.php
File metadata and controls
69 lines (58 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace App\Http\View\Composers;
use Illuminate\View\View;
class SidebarComposer
{
protected $menus;
public function __construct()
{
// Dependencies automatically resolved by service container...
$this->menus = collect();
$this->registerMenu();
}
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
// $this->checkActiveMenu();
$view->with('menus', $this->menus);
}
private function registerMenu()
{
$this->menus->push(collect([
'key' => 'dashboard',
'url' => route('home'),
'icon' => 'nav-icon fas fa-tachometer-alt',
'label' => 'Dashboard',
'visible' => true,
]));
$this->menus->push(collect([
'key' => 'ahli_keluarga',
'url' => route('family.index'),
'icon' => 'nav-icon fas fa fa-users',
'label' => 'Ahli keluarga',
'visible' => true,
'us'
]));
$this->menus->push(collect([
'key' => 'salasilah',
'url' => route('family.index'),
'icon' => 'nav-icon fas fa fa-sitemap',
'label' => 'Salasilah',
'visible' => true,
]));
$this->menus->push(collect([
'key' => 'profile',
'url' => route('profile.index'),
'icon' => 'fa fa-lg fa fa-cog',
'label' => 'Profil',
'visible' => true,
'order' => 'setting'
]));
}
}
?>