blackforest/symfony-favicons-webpack-bundle
{{ favicon() }} in templates).webpack.config.js hooks).laravel-favicons, spatie/laravel-favicons) that are purpose-built for the ecosystem.ContainerInterface, EventDispatcher) won’t work in Laravel without significant refactoring.favicons-webpack-plugin), these might be reusable in Laravel Mix/Vite with minor config adjustments.ContainerInterface with Laravel’s Illuminate\Container\Container.// Symfony (original)
$this->container->get('twig')->addExtension(new FaviconExtension());
// Laravel (adapted)
app()->singleton(FaviconExtension::class);
Blade::directive('favicon', function () { ... });
config/favicons.php).public/favicons.vite.config.js to include favicon assets.{{ favicon('apple-touch') }} → Blade equivalent).favicons-webpack-plugin, it can likely be integrated into Laravel Mix by adding it to mix.js:
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
mix.webpackConfig({
plugins: [
new FaviconsWebpackPlugin('./path/to/icon.png')
]
});
@vitejs/plugin-favicons or a custom plugin.{# Symfony #}
<link rel="icon" href="{{ favicon('favicon.ico') }}">
{# Laravel #}
<link rel="icon" href="{{ asset('favicons/favicon.ico') }}">
symfony/twig-bundle, webpack-encore).symfony/process) may introduce unnecessary bloat or conflicts..ico, .png, .svg) increase build output size.
mix.copy() or Vite’s optimizeDeps to manage assets efficiently.How can I help you explore Laravel packages today?