Comments (9)
Hmm that should work just fine. Did you try clearing your views?
from blade-icons.
Views cleared, no changes.
from blade-icons.
It's weird because I'm using atm as such and it works for me. So I'm wondering what's different for you. You're sure you're using the latest commit from the next version branch?
from blade-icons.
I installed it 30 minutes ago, but to be sure:
composer.json
{
...
"require": {
...
"nothingworks/blade-svg": "dev-next-version"
},
...
}
$ composer update
Updating dependencies (including require-dev)
Nothing to install or update
...
Discovered Package: nothingworks/blade-svg
$ php artisan view:clear
Compiled views cleared!
I still got a ViewException
.
from blade-icons.
Has it something to do with the fact that the Factory is defined as a singleton in the Service Provider but is actually never called (so the registerComponents() method can't do its magic) ?
from blade-icons.
I added this inside the registerFactory()
of BladeInconsServiceProvider
to instantiate the singleton, and it works now:
private function registerFactory(): void
{
/* ... */
$this->app->make(Factory::class);
}
from blade-icons.
Or just bind the instance:
private function registerFactory(): void
{
$config = $this->app->make('config')->get('blade-icons');
$factory = new Factory(new Filesystem(), $config['class']);
foreach ($config['sets'] as $set => $options) {
$options['path'] = $this->app->basePath($options['path']);
$factory->add($set, $options);
}
$this->app->instance(Factory::class, $factory);
}
from blade-icons.
@fredericseiler thanks, that's a good tip. Just pushed a commit which should fix this. Not sure why I didn't caught this before.
from blade-icons.
Fixed indeed, thank you!
from blade-icons.
Related Issues (20)
- php artisan icons:cache Does not work on vapor as vapor do not have those write access to those dir HOT 1
- Duplicate attibutes HOT 3
- Svg by name "home" from set "default" not found HOT 4
- Helper mistakes a blade component for an svg HOT 5
- Icons in subdirectories and `Unable to locate a class or view for component` HOT 7
- JavaScript code is not working for getting icon from JS - 'return <svg><use href="#icon-my-custom-hash"></use></svg>' HOT 1
- Error after installation HOT 7
- Bit confused on install instructions -- icons not showing up HOT 4
- Website Demo: Unable to Retrieve Icons through Search HOT 1
- Icon search is broken on the web site HOT 1
- How to download initial svg files into the correct folder? HOT 1
- Can't use blade-uit kit icons in laravel 11 HOT 2
- How to overwrite settings from a third party icon set?
- Tests running slowly after just installing a couple icons HOT 2
- Exception when loading provider HOT 1
- Exception when loading provider HOT 1
- Performacne issue HOT 1
- The options for the "heroicons" set don't have a prefix defined. HOT 1
- All pages on your website return 404 HOT 1
- v1.7.0 introduced blade cache issues HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blade-icons.