@sukhchainsingh88 try starting with a forward slash in case you are in a different route, so it will try to use the absolute path:
asset('/js/app.js')
In my laravel project i am trying to get js file though asset('js/app.js') which is inside public folder. it is working fine on localhost but on server it is not picking file. It is working on another server. I think there is any issue with htaccess file.
I try to use url() and URL::asset() but not working. I checked source of page link is perfect but still fail to pick file
I want to access that js file.
Try asset('public/js/app.js'), and find a way to serve your site from the public, not from root.
asset('public/js/app.js')
Please or to participate in this conversation.