2017-02-10 159 views
0

我發表在我的Laravel插件文件,並在這一行:無法找到路徑:<0>

$this->publishes([__DIR__ . '/../config/tournaments.php' => config_path('tournaments.php'), '']); 

我得到:

Can't locate path: <0> 

這是奇怪,因爲當我打印config_path ('tournaments.php'),這是OK的,旁邊,文件是很好地複製....所以,一切正常,但我想擺脫這個消息,不應該在那裏......

任何想法????

回答

0

嘗試刪除空''publishes數組中:

$this->publishes([__DIR__ . '/../config/tournaments.php' => config_path('tournaments.php'),]); 

Laravel成功地發佈tournaments.php,但給你空白值的誤差。一些更多的信息在這裏:https://laravel.com/docs/5.4/packages#resources