sunshinev / laravel-gii

Generate CRUD based on Mysql table structure Laravel Extension package
https://sunshinev.github.io/laravel-gii-home/
GNU General Public License v3.0
112 stars 24 forks source link

windows系统中路径错误(path error) #3

Open xnzdev opened 4 years ago

xnzdev commented 4 years ago

vue 解析出错 error eg: D:wwwweblaravel6 outes/api.php 正确路径应如下: right: eg: D:/www/web/laravel6/routes/api.php

建议修改文件 vendor\sunshinev\laravel-gii\src\Business\GenerateBusiness.php 中3处 $virtualPath = str_replace('\\', '/', $virtualPath); windows和Linux都适用

sunshinev commented 4 years ago

好的~感谢支持~目前没有Windows~~ 我稍后修复下,替换成 DIRECTORY_SEPARATOR

wskeee commented 4 years ago

问题还没有解决哦!另外替换成DIRECTORY_SEPARATOR应该也不行吧? $virtualPath == $file['virtual_path'] 这里的判断是否可以换成其它唯一性的字段?

sunshinev commented 4 years ago

问题还没有解决哦!另外替换成DIRECTORY_SEPARATOR应该也不行吧? $virtualPath == $file['virtual_path'] 这里的判断是否可以换成其它唯一性的字段?

这个问题应该是在底层生成器的时候,没有全局来考虑windows和mac linux下的路径分隔符,我需要把后端整体调整下 静候佳音

sunshinev commented 4 years ago

@wskeee hi, I have already fix the DIRECTORY_SEPARATOR problems at the v1.0.5 tags, and you can also use composer to install the package ,because i don't have windows computer, so i can't confirm all the path is correct

嗨,我已经在v1.0.5标签上解决了DIRECTORY_SEPARATOR问题, 而且您还可以使用composer安装该软件包,因为我没有Windows计算机,因此我无法确认所有路径均正确