What's good practice for dealing with links in blade templates during development vs deployment?
Having relative paths, storing the site into a var or something else?
@Snapey I see. If I explicitly wanted to fetch a base url that represents a live site like example.com which helper fn would you recommend in production?
Use the actual functionality given to you by Laravel such as the route helper, which will generate proper URLs regardless of what your application’s base URL is:
<a href="{{ route('home') }}">Home</a>
You’re asking lots of basic questions that it’s clear you need to spend a little time reading the Laravel docs instead of just writing code, not knowing about fundamental things like this, and teaching yourself lots of bad practices and/or inefficiencies.
A few hours reading the Laravel docs will save you weeks of un-doing bad habits you’ll have picked up by ignoring them in the first place.