11<?php
2+
23namespace WebmanTech \AmisAdmin ;
34
45class Install
@@ -8,10 +9,10 @@ class Install
89 /**
910 * @var array
1011 */
11- protected static $ pathRelation = array (
12- '../copy/config/plugin ' => 'config/plugin/webman-tech/amis-admin ' ,
13- '../copy/resource/translations ' => 'resource/translations ' ,
14- );
12+ protected static $ pathRelation = array (
13+ '../copy/config/plugin ' => 'config/plugin/webman-tech/amis-admin ' ,
14+ '../copy/resource/translations/en/amis-admin.php ' => 'resource/translations/en/amis-admin.php ' ,
15+ );
1516
1617 /**
1718 * Install
@@ -39,13 +40,13 @@ public static function installByRelation()
3940 {
4041 foreach (static ::$ pathRelation as $ source => $ dest ) {
4142 if ($ pos = strrpos ($ dest , '/ ' )) {
42- $ parent_dir = base_path (). '/ ' . substr ($ dest , 0 , $ pos );
43+ $ parent_dir = base_path () . '/ ' . substr ($ dest , 0 , $ pos );
4344 if (!is_dir ($ parent_dir )) {
4445 mkdir ($ parent_dir , 0777 , true );
4546 }
4647 }
4748 //symlink(__DIR__ . "/$source", base_path()."/$dest");
48- copy_dir (__DIR__ . "/ $ source " , base_path (). "/ $ dest " );
49+ copy_dir (__DIR__ . "/ $ source " , base_path () . "/ $ dest " );
4950 echo "Create $ dest
5051 " ;
5152 }
@@ -58,7 +59,7 @@ public static function installByRelation()
5859 public static function uninstallByRelation ()
5960 {
6061 foreach (static ::$ pathRelation as $ source => $ dest ) {
61- $ path = base_path (). "/ $ dest " ;
62+ $ path = base_path () . "/ $ dest " ;
6263 if (!is_dir ($ path ) && !is_file ($ path )) {
6364 continue ;
6465 }
0 commit comments