codeat3/blade-google-material-design-icons
Use Google Material Design Icons as Blade components in Laravel. Powered by Blade Icons, supports configuration and icon caching for better performance. Browse included SVGs or preview icons on fonts.google.com. Compatible with PHP 7.4+ and Laravel 8+.
| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Blade-specific | Low | Isolate usage to Blade-only components. |
| Asset pipeline conflicts | Medium | Override package’s asset inclusion logic. |
| Icon customization | Medium | Extend package or wrap in a facade. |
| Dependency bloat | Low | Audit for unused Google Fonts loading. |
| Future Laravel updates | Low | Laravel 13 compatibility confirmed; monitor future versions. |
public_path()) or only CDN links?@materialIcon("home") vs. <i class="material-icons">home</i>).// app/Helpers/MaterialIcon.php
class MaterialIcon {
public static function render(string $name, array $options = []) {
$class = "material-icons " . ($options['size'] ?? '');
return "<i class=\"{$class}\">{$name}</i>";
}
}
Usage: @php echo \App\Helpers\MaterialIcon::render('home', ['size' => 'large']) @endphp// mix.js (Vite)
module.exports = {
copy: {
icons: './node_modules/@mdi/font/css/material-icons.css', // Hypothetical path
},
};
<span x-data="{ icon: 'home' }" x-text="`@materialIcon(${icon})`"></span>
php artisan view:clear, check browser console for 404s.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package unmaintained | Broken in future Laravel versions | Fork or replace with manual implementation. |
| CDN outage | Icons fail to load | Local asset fallback. |
| Blade directive conflict | Rendering errors | Rename directive or namespace it. |
| Asset pipeline conflicts | Styling/loading issues | Custom asset inclusion. |
| Icon set changes | Deprecated icons | Monitor package updates. |
@materialIcon("name") syntax is intuitive.How can I help you explore Laravel packages today?