igaster / laravel-theme

Theme support for Laravel
MIT License
520 stars 113 forks source link

Theme::url() assumes webroot is /public/ #6

Closed TheDigitalOrchard closed 9 years ago

TheDigitalOrchard commented 9 years ago

Laravel is distributed with a default webroot folder called /public/ within its file structure, but that is not compatible with all web servers. Some servers will have a webroot in a different location, such as /public_html/ on cPanel servers.

Theme::url() makes an assumption that Laravel's /public/ folder is the webroot, and therefore fails to find assets when the webroot is located somewhere else. One workaround could be to compose the path using $_SERVER['DOCUMENT_ROOT'] as the base.

igaster commented 9 years ago

fixed in v1.0.12