Reputation: 1082
I want to show image in backend render list. For that how to get the path to show image. We have tried base_path() method.
But it gives me full path like "opt/lampp/htdocs/ashish/" but i want to get http://localhost/ashish
Upvotes: 12
Views: 16668
Reputation: 171
You can use:
Config::get('app.url')
but first you have to properly configure your base path in app/config.php
I think is more general and you can also force the https if you need it.
Upvotes: 6
Reputation: 57
This the way that I have tried & proved its working nicely when working with displaying images from media manager.
Config::get('cms.storage.media.path')
Upvotes: 0
Reputation: 1082
Please use Request::getBaseUrl() for get base path like http://localhost/ashish
Upvotes: 7