How to route to a static folder in Laravel

前端 未结 3 1759
夕颜
夕颜 2020-12-25 12:24

I have a folder I\'ve placed in the /public folder in my Laravel site. The path is:

/public/test

the \"test\" folder has a file called inde

3条回答
  •  天涯浪人
    2020-12-25 12:44

    used to face this problem before, as a dirty little trick, you may rename the test folder to something else then update

    return File::get(public_path() . '/to new folder name/index.html');
    

    the key is no conflict between your route url with your folder in public

提交回复
热议问题