Log1x / blade-svg-sage

A simple package to add support for Blade SVG by Adam Wathan to Roots Sage.
MIT License
73 stars 13 forks source link

Class sage.BladeSvgSage\BladeSvgSage does not exist #21

Closed paddyohanlon closed 5 years ago

paddyohanlon commented 5 years ago

I've installed the plugin with composer require log1x/blade-svg-sage, in my Bedrock root directory, and can see the log1x dir in vendor, so the install seems successful.

However, when I do @svg('facebook') in footer.blade.php for example, I get "@svg('facebook')" displayed as text in the browser, as if the directive does not exist.

If I try @php App\svg_image('facebook.svg') @endphp or @include(App\svg_image('facebook.svg')) I get the following error:

Fatal error: Uncaught ReflectionException: Class sage.BladeSvgSage\BladeSvgSage does not exist in /srv/www/mydomain.com/current/web/app/themes/my-theme/vendor/illuminate/container/Container.php on line 767

In my composer.json file I see "log1x/blade-svg-sage": "^2.0", so I should be on the latest version of the plugin.

I'm testing locally with Sage 9 + Bedrock and Trellis. The issue is the same whether I'm watching with yarn start or not.

Any guidance would be super appreciated!

Log1x commented 5 years ago

This is a package, not a plugin/mu-plugin- so it needs to be required from inside of the Sage folder (to go into Sage's composer.json)