laravel-electron
laravel-electron copied to clipboard
Access resources in public folder
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?
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
Good
Thanks pro! It saved my day.