Make your master layout to set the <base>
tag pointing to your base URL so all the relative links of your assets are always referred to your base URL instead of your current URL.
Thanks, but I don't think set the base tag is a good solution for this kind of problem.
for example, on my development environment, the application are accessed with http://localhost/, which is root directory, but on the real production environment, this might be change to any folder, like client directory on site A, also might be members directory on site B.
so setting the base tag will need to modify each site's master layout file.
Is there any other way to do this?
how stupid I am. just add this to head section of layout
<base href="{{URL::to('/')}}/">
then every relative link will work now.
Notice: you must add the tailing slash.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community