How do i get base url in OctoberCMS?

- 1 answer

Ad

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

Ad

Answer

Ad

In twig you can do:

{{ url('/') }}
Ad
source: stackoverflow.com
Ad