- Output for 8.0.1 - 8.0.28, 8.1.0 - 8.1.19, 8.2.0 - 8.2.6
- Fatal error: Uncaught Error: Call to undefined function config() in /in/b3s6j:6
Stack trace:
#0 {main}
thrown in /in/b3s6j on line 6
Process exited with code 255.
<?php
// get all icons getSetByPrefix
$icons = [];
foreach (config('blade-icons.sets') as $key => $value) {
$icons[$key] = [];
$path = $value['path'];
$prefix = $value['prefix'];
$files = scandir($path);
foreach ($files as $file) {
if (strpos($file, '.svg') !== false) {
$name = str_replace('.svg', '', $file);
$icons[$key][] = $prefix . '-' . $name;
}
}
}