How do i get base url in OctoberCMS?

Ashish Detroja picture Ashish Detroja · Jun 15, 2016 · Viewed 12.3k times · Source

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

Answer

Will picture Will · Jul 13, 2016

In twig you can do:

{{ url('/') }}