Skip to content
New issue

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

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

Already on GitHub? # to your account

Assets #82

Closed
skalero01 opened this issue Apr 28, 2019 · 4 comments
Closed

Assets #82

skalero01 opened this issue Apr 28, 2019 · 4 comments

Comments

@skalero01
Copy link

In your documentation you dont have any information about how to call the assets on the layout view, i tried adding the {{ Theme::path('public/css/style.css') }} on the view but i am getting on the browser the next error Not allowed to load local resource: file:///C:/laragon/www/xxx/themes/xxx/public/css/style.css

Your documentation on the website doesnt say anything about assets and the wiki on here is not updated. How should this be solved?

@UnderlineWords
Copy link
Contributor

UnderlineWords commented Jul 13, 2019

There was a 'asset' method on previous versions for asset functionality. Take a look at;

/**

I guess it was removed after.

@tpaksu
Copy link
Contributor

tpaksu commented Oct 18, 2019

Any news about this issue?

@tpaksu
Copy link
Contributor

tpaksu commented Oct 18, 2019

I fixed it with: <link href="{{ asset('themes/'.\Theme::getCurrent().'/css/theme.css') }}" rel="stylesheet">. Same with the JS file.

@kaidesu
Copy link
Contributor

kaidesu commented Feb 6, 2020

I assume these references are within your theme's layout - what's the use case for pulling a reference of the current theme when you know you're working with a specific theme?

Just reference the theme directly 👍

<link href="{{ asset('themes/bootstrap/css/theme.css') }}" rel="stylesheet">

@kaidesu kaidesu closed this as completed Feb 6, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants