Closed issunboshi closed 5 years ago
For your second example you need to call it within the App namespace:
Facebook {{ \App\svg_image('facebook') }}
Try deleting your views cache (uploads/cache/), your composer cache (theme_dir/.cache-loader), and running (from theme_dir) composer dump-autoload
^
Thanks, would that also apply to @svg('facebook')
, so @\App\svg('facebook')
?
No. If @svg()
still isn't working, it would usually come down to a cache issue.
@issunboshi Blade directives (things following @
) will never have special characters like \
in the name
Hi,
I've installed the package but when calling
@svg('icon-name')
from a view e.g. in one of my partials I have@svg('facebook')
the template just renders the text "@svg('facebook')".I've added the filter to Sage's setup.php
and the icons exist at that path relative to the sage root.
Here are the 2 ways I've tried to use it so far
and
The first does as I've mentioned above and the second causes Call to undefined function app().
Sage version "roots/sage-lib": "9.0.9"