简体   繁体   中英

Laravel artisan right base_url

I'm using laravel version 4.1.30. Where to tell Artisan the right base url?

My project is in a subfolder http://localhost/test/

When I use the browser the right base_urls are generated. I'm using the route helper function (but tried other also). However when I execute an artisan command base_urls are without the sub folder (just http://localhost/ )

In /app/config/app.php the right base_url is used 'url' => 'http://localhost/test/'

From artisan if I call \\URL::to('/'); it returns http://locahost , instead of http://localhost/test

Please help.

How do you detect your environment? If using Environment Variables, like APP_ENV set with Apache, try typing this in your terminal:

export APP_ENV=local

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM