Completed
Push — master ( fa9ba3...d6fa90 )
by Sergi Tur
14:50 queued 11:47
created

AdminLTE::databaseConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Acacha\AdminLTETemplateLaravel;
4
5
/**
6
 * Class AdminLTE.
7
 */
8
class AdminLTE
9
{
10
    /**
11
     * Home controller copy path.
12
     *
13
     * @return array
14
     */
15
    public function homeController()
16
    {
17
        return [
18
            ADMINLTETEMPLATE_PATH.'/src/stubs/HomeController.stub' => app_path('Http/Controllers/HomeController.php'),
19
        ];
20
    }
21
22
    /**
23
     * Auth register controller copy path.
24
     *
25
     * @return array
26
     */
27
    public function registerController()
28
    {
29
        return [
30
            ADMINLTETEMPLATE_PATH.'/src/stubs/RegisterController.stub' =>
31
                app_path('Http/Controllers/Auth/RegisterController.php'),
32
        ];
33
    }
34
35
    /**
36
     * Auth login controller copy path.
37
     *
38
     * @return array
39
     */
40
    public function loginController()
41
    {
42
        return [
43
            ADMINLTETEMPLATE_PATH.'/src/stubs/LoginController.stub' =>
44
                app_path('Http/Controllers/Auth/LoginController.php'),
45
        ];
46
    }
47
48
    /**
49
     * Auth forgot password controller copy path.
50
     *
51
     * @return array
52
     */
53
    public function forgotPasswordController()
54
    {
55
        return [
56
            ADMINLTETEMPLATE_PATH.'/src/stubs/ForgotPasswordController.stub' =>
57
                app_path('Http/Controllers/Auth/ForgotPasswordController.php'),
58
        ];
59
    }
60
61
    /**
62
     * Auth reset password controller copy path.
63
     *
64
     * @return array
65
     */
66
    public function resetPasswordController()
67
    {
68
        return [
69
            ADMINLTETEMPLATE_PATH.'/src/stubs/ResetPasswordController.stub' =>
70
                app_path('Http/Controllers/Auth/ResetPasswordController.php'),
71
        ];
72
    }
73
74
    /**
75
     * Public assets copy path.
76
     *
77
     * @return array
78
     */
79
    public function publicAssets()
80
    {
81
        return [
82
            ADMINLTETEMPLATE_PATH.'/public/img'                 => public_path('img'),
83
            ADMINLTETEMPLATE_PATH.'/public/css'                 => public_path('css'),
84
            ADMINLTETEMPLATE_PATH.'/public/js'                  => public_path('js'),
85
            ADMINLTETEMPLATE_PATH.'/public/plugins'             => public_path('plugins'),
86
            ADMINLTETEMPLATE_PATH.'/public/fonts'               => public_path('fonts'),
87
            ADMINLTETEMPLATE_PATH.'/public/mix-manifest.json'   => public_path('mix-manifest.json'),
88
        ];
89
    }
90
91
    /**
92
     * Only views to overwrite.
93
     *
94
     * @return array
95
     */
96
    public function viewsToOverwrite()
97
    {
98
        return [
99
            ADMINLTETEMPLATE_PATH.'/resources/views/errors'            =>
100
                resource_path('views/errors'),
101
            ADMINLTETEMPLATE_PATH.'/resources/views/welcome.blade.php' =>
102
                resource_path('views/welcome.blade.php'),
103
            ADMINLTETEMPLATE_PATH.'/resources/views/layouts/partials/sidebar.blade.php' =>
104
                resource_path('views/vendor/adminlte/layouts/partials/sidebar.blade.php'),
105
        ];
106
    }
107
108
    /**
109
     * Path of sidebar.
110
     *
111
     * @return array
112
     */
113
    public function sidebarView()
114
    {
115
        return [
116
            ADMINLTETEMPLATE_PATH.'/resources/views/layouts/partials/sidebar.blade.php' =>
117
                resource_path('views/vendor/adminlte/layouts/partials/sidebar.blade.php'),
118
        ];
119
    }
120
121
    /**
122
     * Views copy path.
123
     *
124
     * @return array
125
     */
126
    public function views()
127
    {
128
        return [
129
            ADMINLTETEMPLATE_PATH.'/resources/views/auth'              =>
130
                resource_path('views/vendor/adminlte/auth'),
131
            ADMINLTETEMPLATE_PATH.'/resources/views/auth/emails'       =>
132
                resource_path('views/vendor/adminlte/auth/emails'),
133
            ADMINLTETEMPLATE_PATH.'/resources/views/errors'            =>
134
                resource_path('views/vendor/adminlte/errors'),
135
            ADMINLTETEMPLATE_PATH.'/resources/views/layouts'           =>
136
                resource_path('views/vendor/adminlte/layouts'),
137
            ADMINLTETEMPLATE_PATH.'/resources/views/home.blade.php'    =>
138
                resource_path('views/vendor/adminlte/home.blade.php'),
139
            ADMINLTETEMPLATE_PATH.'/resources/views/welcome.blade.php' =>
140
                resource_path('views/welcome.blade.php'),
141
        ];
142
    }
143
144
    /**
145
     * Tests copy path.
146
     *
147
     * @return array
148
     */
149
    public function tests()
150
    {
151
        return [
152
            ADMINLTETEMPLATE_PATH.'/tests'       => base_path('tests'),
153
            ADMINLTETEMPLATE_PATH.'/phpunit.xml' => base_path('phpunit.xml'),
154
        ];
155
    }
156
157
    /**
158
     * Resource assets copy path.
159
     *
160
     * @return array
161
     */
162
    public function resourceAssets()
163
    {
164
        return [
165
            ADMINLTETEMPLATE_PATH.'/resources/assets/css' => resource_path('assets/css'),
166
            ADMINLTETEMPLATE_PATH.'/resources/assets/img' => resource_path('assets/img'),
167
            ADMINLTETEMPLATE_PATH.'/resources/assets/less' => resource_path('assets/less'),
168
            ADMINLTETEMPLATE_PATH.'/resources/assets/sass' => resource_path('assets/sass'),
169
            ADMINLTETEMPLATE_PATH.'/resources/assets/js'   => resource_path('assets/js'),
170
            ADMINLTETEMPLATE_PATH.'/webpack.mix.js'        => base_path('webpack.mix.js'),
171
            ADMINLTETEMPLATE_PATH.'/package.json'          => base_path('package.json'),
172
        ];
173
    }
174
175
    /**
176
     * Languages assets copy path.
177
     *
178
     * @return array
179
     */
180
    public function languages()
181
    {
182
        return [
183
            ADMINLTETEMPLATE_PATH.'/resources/lang' => resource_path('lang/vendor/adminlte_lang'),
184
        ];
185
    }
186
187
    /**
188
     * Gravatar path.
189
     *
190
     * @return array
191
     */
192
    public function gravatar()
193
    {
194
        return [
195
            base_path().'/vendor/creativeorange/gravatar/config/gravatar.php' => config_path('gravatar.php'),
196
        ];
197
    }
198
199
    /**
200
     * Config path.
201
     *
202
     * @return array
203
     */
204
    public function config()
205
    {
206
        return [
207
            ADMINLTETEMPLATE_PATH.'/config/adminlte.php' => config_path('adminlte.php'),
208
        ];
209
    }
210
211
    /**
212
     * Spatie menu path.
213
     *
214
     * @return array
215
     */
216
    public function spatieMenu()
217
    {
218
        return [
219
            ADMINLTETEMPLATE_PATH.'/resources/views/layouts/partials/sidebar_with_spatie_menu.blade.php' =>
220
                resource_path('views/vendor/adminlte/layouts/partials/sidebar.blade.php')
221
        ];
222
    }
223
224
    /**
225
     * Menu path.
226
     *
227
     * @return array
228
     */
229
    public function menu()
230
    {
231
        return [
232
            ADMINLTETEMPLATE_PATH.'/config/menu.php' =>
233
                config_path('menu.php')
234
        ];
235
    }
236
237
    /**
238
     * Web routes path.
239
     *
240
     * @return array
241
     */
242
    public function webroutes()
243
    {
244
        return [
245
            ADMINLTETEMPLATE_PATH.'/routes/web.php' =>
246
                base_path('routes/web.php')
247
        ];
248
    }
249
250
    /**
251
     * Api routes path.
252
     *
253
     * @return array
254
     */
255
    public function apiroutes()
256
    {
257
        return [
258
            ADMINLTETEMPLATE_PATH.'/routes/api.php' =>
259
                base_path('routes/api.php')
260
        ];
261
    }
262
263
    /**
264
     * Auth config file copy path.
265
     *
266
     * @return array
267
     */
268
    public function authConfig()
269
    {
270
        return [
271
            ADMINLTETEMPLATE_PATH.'/src/stubs/auth.php.stub' => config_path('auth.php'),
272
        ];
273
    }
274
275
    /**
276
     * User class copy path.
277
     *
278
     * @return array
279
     */
280
    public function userClass()
281
    {
282
        return [
283
            ADMINLTETEMPLATE_PATH.'/src/stubs/User.php.stub' => app_path('User.php'),
284
        ];
285
    }
286
287
    /**
288
     * AppServiceProvider class copy path.
289
     *
290
     * @return array
291
     */
292
    public function appServiceProviderClass()
293
    {
294
        return [
295
            ADMINLTETEMPLATE_PATH.'/src/stubs/AppServiceProvider.php.stub' => app_path('Providers/AppServiceProvider.php'),
296
        ];
297
    }
298
299
    /**
300
     * Dusk environment files copy path.
301
     *
302
     * @return array
303
     */
304
    public function duskEnvironment()
305
    {
306
        return [
307
            ADMINLTETEMPLATE_PATH.'/.env.dusk.local'        => base_path('.env.dusk.local'),
308
            ADMINLTETEMPLATE_PATH.'/.env.dusk.testing'      => base_path('.env.dusk.testing'),
309
        ];
310
    }
311
312
    /**
313
     * Database config copy path.
314
     *
315
     * @return array
316
     */
317
    public function databaseConfig()
318
    {
319
        return [
320
            ADMINLTETEMPLATE_PATH.'/config/database.php'    => config_path('database.php'),
321
        ];
322
    }
323
}
324