Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

saaadshz's avatar

Laravel asset path on local and hosting

Hi, I want to ask about the Laravel asset path on local and live.

The below path work on hosting but doesn't work on local

<link rel="stylesheet" media="screen" href="{{asset('public/assets/front-end')}}/vendor/simplebar/dist/simplebar.min.css"/>

public is extra for local when I remove public from the path for local it accesses the file but it doesn't work at live.

<link rel="stylesheet" media="screen" href="{{asset('assets/front-end')}}/vendor/simplebar/dist/simplebar.min.css"/>
0 likes
1 reply
Snapey's avatar

because live is setup wrong. You should not have /public in your URLs

Please or to participate in this conversation.