AdminLTE + symfony2 - >无法找到文件

时间:2015-08-24 14:20:49

标签: php symfony

我尝试安装adminlte捆绑但没有运气。我总是得到:

Unable to find file "@AvanzuAdminThemeBundle/Resources/public/vendor/modernizr/modernizr.js" in . (which is being imported from "app\cache\dev/assetic/routing.yml").

我做过的事情: 将此添加到composer.json

   {
        "require": {
            "avanzu/admin-theme-bundle": "~1.3"
        }
    }

然后php composer.phar require avanzu/admin-theme-bundlenew Avanzu\AdminThemeBundle\AvanzuAdminThemeBundle(),添加到AppKernel

使用app/console assets:install --symlink

复制所有内容

然后去了base.html.twig并添加了 {% extends 'AvanzuAdminThemeBundle:layout:base-layout.html.twig' %}

如果我启动服务器,我会收到这些错误。文件位于:

./vendor/avanzu/admin-theme-bundle/Resources/public/static/dev/scripts/modernizr.js
./vendor/avanzu/admin-theme-bundle/Resources/public/static/prod/scripts/modernizr.js
./web/bundles/avanzuadmintheme/static/dev/scripts/modernizr.js
./web/bundles/avanzuadmintheme/static/prod/scripts/modernizr.js

我的错是什么?谢谢!

2 个答案:

答案 0 :(得分:0)

您还必须获取所有供应商:

php app / console avanzu:admin:fetch-vendor

Here是文档。

祝你好运!

答案 1 :(得分:0)

运行以下命令以创建所有符号链接

php bin/console assets:install --symlink

OR

php app/console assets:install --symlink