doufeiqiong3515 2016-06-07 11:20
浏览 55
已采纳

Laravel 5.2资产实施

When I try to open the assets,I added on my page on the source (css, js),I get the log error at the end of the page.

Here's what I've tried so far:

homepage.blade.php

<link href="{{{asset('/css/bootstrap.css') }}}" rel="stylesheet"> 

Composer.json

"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.2.*",
        "laravelcollective/html": "^5.2"
    }

composer update from console.

added to app.php->providers

Collective\Html\HtmlServiceProvider::class 

added to app.php->aliases

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class

I get this in laravel.log:

local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Html\HtmlServiceProvider' not found' in /var/www/html/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146

Thanks in advance.

  • 写回答

2条回答 默认 最新

  • doucheng3811 2016-06-07 22:45
    关注

    Thanks for your answers.

    The problem was about setting the virtual host settings wrong. So i wasn't able to reach the true path.

    I re-set the vhost configuration and it works now.

    <VirtualHost *:80>
            ServerName mysite.com
            ServerAdmin mysite@mysite.com
            DocumentRoot /var/www/html/mysite/public
    
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory "/var/www/html/mysite">
                    AllowOverride All
            </Directory>
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    

    Reference: http://vaguelyuseful.info/2016/02/02/installing-laravel-5-2-on-ubuntu-15-10-and-apache2/

    Thank you all again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!