laravel-electron icon indicating copy to clipboard operation
laravel-electron copied to clipboard

Access resources in public folder

Open bahmanworld opened this issue 4 years ago • 3 comments

Hi

I got problem with accessing resources in laravel and electron. GET http://127.0.0.1:8000/public/css/app.css net::ERR_ABORTED 404 (Not Found) GET http://127.0.0.1:8000/public/js/app.js net::ERR_ABORTED 404 (Not Found)

I tried to access asset files like css and js in public folder using {{ asset('public/css/app.css') }} function but i got error 404

I tried all these ways: asset('public/css/app.css') url('public/css/app.css') mix('css/app.css')

example: <link rel="stylesheet" href="{{ asset('public/css/app.css') }}" />

but same results

how can i access resources in public folder?

bahmanworld avatar Aug 30 '20 12:08 bahmanworld

In Laravel you don't need to specify the public forlder you can just do <link href="{{ asset('css/app.css') }}" rel="stylesheet"> without the public folder in the path

DevShaded avatar Nov 06 '20 14:11 DevShaded

Good

fullstackengineer777 avatar Dec 19 '22 05:12 fullstackengineer777

Thanks pro! It saved my day.

Lalarukh-khan avatar Feb 14 '23 12:02 Lalarukh-khan