@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function getSetting() |
82 | 82 | { |
83 | - return Admin::content(function (Content $content) { |
|
83 | + return Admin::content(function(Content $content) { |
|
84 | 84 | $content->header(trans('admin.user_setting')); |
85 | 85 | $form = $this->settingForm(); |
86 | 86 | $form->tools( |
87 | - function (Form\Tools $tools) { |
|
87 | + function(Form\Tools $tools) { |
|
88 | 88 | $tools->disableBackButton(); |
89 | 89 | $tools->disableListButton(); |
90 | 90 | } |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | */ |
111 | 111 | protected function settingForm() |
112 | 112 | { |
113 | - return Administrator::form(function (Form $form) { |
|
113 | + return Administrator::form(function(Form $form) { |
|
114 | 114 | $form->display('username', trans('admin.username')); |
115 | 115 | $form->text('name', trans('admin.name'))->rules('required'); |
116 | 116 | $form->image('avatar', trans('admin.avatar')); |
117 | 117 | $form->password('password', trans('admin.password'))->rules('confirmed|required'); |
118 | 118 | $form->password('password_confirmation', trans('admin.password_confirmation'))->rules('required') |
119 | - ->default(function ($form) { |
|
119 | + ->default(function($form) { |
|
120 | 120 | return $form->model()->password; |
121 | 121 | }); |
122 | 122 | |
@@ -124,13 +124,13 @@ discard block |
||
124 | 124 | |
125 | 125 | $form->ignore(['password_confirmation']); |
126 | 126 | |
127 | - $form->saving(function (Form $form) { |
|
127 | + $form->saving(function(Form $form) { |
|
128 | 128 | if ($form->password && $form->model()->password != $form->password) { |
129 | 129 | $form->password = bcrypt($form->password); |
130 | 130 | } |
131 | 131 | }); |
132 | 132 | |
133 | - $form->saved(function () { |
|
133 | + $form->saved(function() { |
|
134 | 134 | admin_toastr(trans('admin.update_succeeded')); |
135 | 135 | |
136 | 136 | return redirect(admin_url('auth/setting')); |
@@ -24,14 +24,14 @@ discard block |
||
24 | 24 | */ |
25 | 25 | public function index() |
26 | 26 | { |
27 | - return Admin::content(function (Content $content) { |
|
27 | + return Admin::content(function(Content $content) { |
|
28 | 28 | $content->header(trans('admin.menu')); |
29 | 29 | $content->description(trans('admin.list')); |
30 | 30 | |
31 | - $content->row(function (Row $row) { |
|
31 | + $content->row(function(Row $row) { |
|
32 | 32 | $row->column(6, $this->treeView()->render()); |
33 | 33 | |
34 | - $row->column(6, function (Column $column) { |
|
34 | + $row->column(6, function(Column $column) { |
|
35 | 35 | $form = new \Encore\Admin\Widgets\Form(); |
36 | 36 | $form->action(admin_url('auth/menu')); |
37 | 37 | |
@@ -65,10 +65,10 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function treeView() |
67 | 67 | { |
68 | - return Menu::tree(function (Tree $tree) { |
|
68 | + return Menu::tree(function(Tree $tree) { |
|
69 | 69 | $tree->disableCreate(); |
70 | 70 | |
71 | - $tree->branch(function ($branch) { |
|
71 | + $tree->branch(function($branch) { |
|
72 | 72 | $payload = "<i class='fa {$branch['icon']}'></i> <strong>{$branch['title']}</strong>"; |
73 | 73 | |
74 | 74 | if (!isset($branch['children'])) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | */ |
96 | 96 | public function edit($id) |
97 | 97 | { |
98 | - return Admin::content(function (Content $content) use ($id) { |
|
98 | + return Admin::content(function(Content $content) use ($id) { |
|
99 | 99 | $content->header(trans('admin.menu')); |
100 | 100 | $content->description(trans('admin.edit')); |
101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function form() |
112 | 112 | { |
113 | - return Menu::form(function (Form $form) { |
|
113 | + return Menu::form(function(Form $form) { |
|
114 | 114 | $form->display('id', 'ID'); |
115 | 115 | |
116 | 116 | $form->select('parent_id', trans('admin.parent_id'))->options(Menu::selectOptions()); |
@@ -120,7 +120,7 @@ |
||
120 | 120 | * Get url of current resource. |
121 | 121 | * @return string |
122 | 122 | */ |
123 | - public function getResourceURL(){ |
|
123 | + public function getResourceURL() { |
|
124 | 124 | return url($this->getResource()); |
125 | 125 | } |
126 | 126 |