如何在Laravel中设置CodeIgniter中的assets文件夹

like the public folder given by laravel default i tried to create something like that for easy make up of my css, js, picture and so on. I tried configuring it like this. In my application/helpers/utility_helpers.php

    <?php
    function asset_url()
    {
  return base_url().'assets/';
    }
     ?>

I have my assests folder along with application, system, user_guide etc. i confugured the autoload function of application/config as :

    $autoload['helper'] = array('url','utility');

when i hit any url in browser now, it says

    An Error Was Encountered

    Unable to load the requested file: helpers/utility_helper.php

how can i make it and can you explain me if i need to specify root for that helpers also.And if not can i simply access the assets like this:

    <img src="assets/base_components/build/banner.png">

in my view

查看全部
drd43058
drd43058
2017/03/30 11:26
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

3个回复