2
2
3
3
use CSlant \LaraGenAdv \Exceptions \LaravelGeneratorAdvancedException ;
4
4
5
- if (!function_exists ('laravel_generator_dist_path ' )) {
5
+ if (!function_exists ('lara_gen_adv_dist_path ' )) {
6
6
/**
7
7
* Returns laravel-generator-advanced composer dist path.
8
8
*
9
9
* @param string|null $asset
10
10
* @return string
11
11
*/
12
- function laravel_generator_dist_path (string $ asset = null ): string
12
+ function lara_gen_adv_dist_path (string $ asset = null ): string
13
13
{
14
14
$ defaultPath = config ('lara-gen-adv.defaults.paths.ui_package_path ' ).'/dist/ ' ;
15
- $ assetPath = config ('lara-gen-adv.defaults.paths.laravel_generator_assets_path ' , $ defaultPath );
15
+ $ assetPath = config ('lara-gen-adv.defaults.paths.lara_gen_adv_assets_path ' , $ defaultPath );
16
16
if (!str_ends_with ($ assetPath , '/ ' )) {
17
17
$ assetPath .= '/ ' ;
18
18
}
@@ -26,7 +26,7 @@ function laravel_generator_dist_path(string $asset = null): string
26
26
}
27
27
}
28
28
29
- if (!function_exists ('laravel_generator_asset ' )) {
29
+ if (!function_exists ('lara_gen_adv_asset ' )) {
30
30
/**
31
31
* Returns asset from laravel-generator-advanced composer package.
32
32
*
@@ -36,21 +36,21 @@ function laravel_generator_dist_path(string $asset = null): string
36
36
*
37
37
* @throws LaravelGeneratorAdvancedException
38
38
*/
39
- function laravel_generator_asset (string $ asset ): string
39
+ function lara_gen_adv_asset (string $ asset ): string
40
40
{
41
- $ file = laravel_generator_dist_path ($ asset );
41
+ $ file = lara_gen_adv_dist_path ($ asset );
42
42
43
43
if (!file_exists ($ file )) {
44
44
throw new LaravelGeneratorAdvancedException (sprintf ('%s - this Laravel Generator asset does not exist ' , $ asset ));
45
45
}
46
46
47
47
$ useAbsolutePath = config ('lara-gen-adv.defaults.paths.use_absolute_path ' );
48
48
49
- return route ('laravel_generator .asset ' , ['asset ' => $ asset ], $ useAbsolutePath). ' ?v= ' . filemtime ( $ file );
49
+ return route ('lara_gen_adv .asset ' , ['asset ' => $ asset ], $ useAbsolutePath );
50
50
}
51
51
}
52
52
53
- if (!function_exists ('laravel_generator_dist_path_allowed ' )) {
53
+ if (!function_exists ('lara_gen_adv_dist_path_allowed ' )) {
54
54
/**
55
55
* Returns asset allowed from laravel-generator-advanced composer package.
56
56
*
@@ -60,17 +60,17 @@ function laravel_generator_asset(string $asset): string
60
60
*
61
61
* @throws LaravelGeneratorAdvancedException
62
62
*/
63
- function laravel_generator_asset_allowed (string $ asset ): string
63
+ function lara_gen_adv_asset_allowed (string $ asset ): string
64
64
{
65
65
$ allowed_files = [
66
66
'favicon-16x16.png ' ,
67
67
'favicon-32x32.png ' ,
68
68
];
69
69
70
70
if (!in_array ($ asset , $ allowed_files )) {
71
- throw new LaravelGeneratorAdvancedException (sprintf ('%s - this Laravel Generator asset is not allowed ' , $ asset ));
71
+ throw new LaravelGeneratorAdvancedException (sprintf ('%s - this Laravel Generator Advanced asset is not allowed ' , $ asset ));
72
72
}
73
73
74
- return laravel_generator_asset ($ asset );
74
+ return lara_gen_adv_asset ($ asset );
75
75
}
76
76
}
0 commit comments