@@ -35,7 +35,10 @@ public function boot()
35
35
public function register ()
36
36
{
37
37
$ this ->registerManager ();
38
- $ this ->app ->singleton ('adminconfiguration ' , \AvoRed \Framework \AdminConfiguration \Manager::class);
38
+ $ this ->app ->singleton (
39
+ 'adminconfiguration ' ,
40
+ \AvoRed \Framework \AdminConfiguration \Manager::class
41
+ );
39
42
}
40
43
41
44
/**
@@ -45,9 +48,12 @@ public function register()
45
48
*/
46
49
protected function registerManager ()
47
50
{
48
- $ this ->app ->singleton ('adminconfiguration ' , function () {
49
- new Manager ();
50
- });
51
+ $ this ->app ->singleton (
52
+ 'adminconfiguration ' ,
53
+ function () {
54
+ new Manager ();
55
+ }
56
+ );
51
57
}
52
58
53
59
/**
@@ -96,19 +102,22 @@ protected function registerAdminConfiguration()
96
102
->label ('Term & Condition Page ' )
97
103
->type ('select ' )
98
104
->name ('general_term_condition_page ' )
99
- ->options (function () {
100
- $ options = Page::all ()->pluck ('name ' , 'id ' );
101
- return $ options ;
102
- });
105
+ ->options (
106
+ function () {
107
+ $ options = Page::all ()->pluck ('name ' , 'id ' );
108
+ return $ options ;
109
+ }
110
+ );
103
111
104
112
$ configurationGroup ->addConfiguration ('general_home_page ' )
105
113
->label ('Home Page ' )
106
114
->type ('select ' )
107
115
->name ('general_home_page ' )
108
- ->options (function () {
109
- $ options = Page::all ()->pluck ('name ' , 'id ' );
110
- return $ options ;
111
- });
116
+ ->options (
117
+ function () {
118
+ return Page::all ()->pluck ('name ' , 'id ' );
119
+ }
120
+ );
112
121
113
122
$ userGroup = AdminConfigurationFacade::add ('users ' )
114
123
->label ('Users ' );
@@ -117,19 +126,21 @@ protected function registerAdminConfiguration()
117
126
->label ('User Default Country ' )
118
127
->type ('select ' )
119
128
->name ('user_default_country ' )
120
- ->options (function () {
121
- $ options = Country::all ()->pluck ('name ' , 'id ' );
122
- return $ options ;
123
- });
129
+ ->options (
130
+ function () {
131
+ return Country::all ()->pluck ('name ' , 'id ' );
132
+ }
133
+ );
124
134
125
135
$ userGroup ->addConfiguration ('user_activation_required ' )
126
136
->label ('User Activation Required ' )
127
137
->type ('select ' )
128
138
->name ('user_activation_required ' )
129
- ->options (function () {
130
- $ options = [0 => 'No ' , 1 => 'Yes ' ];
131
- return $ options ;
132
- });
139
+ ->options (
140
+ function () {
141
+ return [0 => 'No ' , 1 => 'Yes ' ];
142
+ }
143
+ );
133
144
134
145
$ shippingGroup = AdminConfigurationFacade::add ('shipping ' )
135
146
->label ('Shipping ' );
@@ -138,10 +149,11 @@ protected function registerAdminConfiguration()
138
149
->label ('Is Free Shipping Enabled ' )
139
150
->type ('select ' )
140
151
->name ('shipping_free_shipping_enabled ' )
141
- ->options (function () {
142
- $ options = [1 => 'Yes ' , 0 => 'No ' ];
143
- return $ options ;
144
- });
152
+ ->options (
153
+ function () {
154
+ return [1 => 'Yes ' , 0 => 'No ' ];
155
+ }
156
+ );
145
157
146
158
$ paymentGroup = AdminConfigurationFacade::add ('payment ' )
147
159
->label ('Payment ' );
@@ -150,10 +162,11 @@ protected function registerAdminConfiguration()
150
162
->label ('Payment Stripe Enabled ' )
151
163
->type ('select ' )
152
164
->name ('payment_stripe_enabled ' )
153
- ->options (function () {
154
- $ options = [0 => 'No ' , 1 => 'Yes ' ];
155
- return $ options ;
156
- });
165
+ ->options (
166
+ function () {
167
+ return [0 => 'No ' , 1 => 'Yes ' ];
168
+ }
169
+ );
157
170
158
171
$ paymentGroup ->addConfiguration ('payment_stripe_publishable_key ' )
159
172
->label ('Payment Stripe Publishable Key ' )
@@ -172,10 +185,11 @@ protected function registerAdminConfiguration()
172
185
->label ('Is Tax Enabled ' )
173
186
->type ('select ' )
174
187
->name ('tax_enabled ' )
175
- ->options (function () {
176
- $ options = [1 => 'Yes ' , 0 => 'No ' ];
177
- return $ options ;
178
- });
188
+ ->options (
189
+ function () {
190
+ return [1 => 'Yes ' , 0 => 'No ' ];
191
+ }
192
+ );
179
193
180
194
$ taxGroup ->addConfiguration ('tax_percentage ' )
181
195
->label ('Tax Percentage ' )
@@ -186,9 +200,10 @@ protected function registerAdminConfiguration()
186
200
->label ('Tax Default Country ' )
187
201
->type ('select ' )
188
202
->name ('tax_default_country ' )
189
- ->options (function () {
190
- $ options = $ options = Country::all ()->pluck ('name ' , 'id ' );
191
- return $ options ;
192
- });
203
+ ->options (
204
+ function () {
205
+ return $ options = Country::all ()->pluck ('name ' , 'id ' );
206
+ }
207
+ );
193
208
}
194
209
}
0 commit comments