aaronlord / laroute

Generate Laravel route URLs from JavaScript.
MIT License
796 stars 138 forks source link

Wrong Urls when in app in subdir #14

Closed yadue closed 8 years ago

yadue commented 9 years ago

If app sits in subdirectory ie: domain.com/app/api/get-users (where /app/ is the main public dir then routes are generated incorrectly pointing to domain.com/api/get-users. Generator does not look up for routes in subdirectories like usual laravel router.

aaronlord commented 9 years ago

It took me a while to figure out what you're asking, but I get what you mean now :)

You've renamed /public to /app, and, domain.com maps to the /, not /app.

Thinking how to implement.

xeno010 commented 9 years ago

@yadue

Set the "absolute" option to true and set your correct application url in config/app.php. Only for laroute >= 2.0.

ghost commented 9 years ago

Just provide a "prefix" option in configurations.