Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access resources in public folder #6

Open
bahmanworld opened this issue Aug 30, 2020 · 3 comments
Open

Access resources in public folder #6

bahmanworld opened this issue Aug 30, 2020 · 3 comments

Comments

@bahmanworld
Copy link

bahmanworld commented Aug 30, 2020

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 bahmanworld changed the title Using reactjs in laravel app Access resources in public folder Aug 30, 2020
@DevShaded
Copy link

DevShaded commented Nov 6, 2020

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

@fullstackengineer777
Copy link

Good

@Lalarukh-khan
Copy link

Lalarukh-khan commented Feb 14, 2023

Thanks pro! It saved my day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants