我使用composer作为PHP依赖项。我的印象是,对于前端依赖项,我应该使用Bower。因此,我安装了Bower并使用它加载了FE依赖项(Bootstrap,jQuery)。然后,我手动将符号链接到库,如下所示:
mypc:/var/www/myproject/public/js$ ls -l
total 8
lrwxrwxrwx 1 tom tom 67 Dec 23 07:29 bootstrap.min.js -> /var/www/myproject/bower_components/bootstrap/dist/js/bootstrap.min.js
lrwxrwxrwx
公用文件夹:
路由:
# An example controller showing a sample home page
GET / controllers.Assets.at(path="/public/html", file="index.html")
# Map static resources from the /public folder to the /assets URL path
GET /*file/ controllers.As