reactorcoder/symfony2-nodesocket
A Symfony2 bundle that integrates the NodeSocket PHP client, letting your Symfony app publish real-time events to a Node.js WebSocket server. Simple service configuration, event-driven messaging, and easy setup for live updates, notifications, and push features in Symfony projects.
composer require vendor/package (check composer.json for exact name).php artisan vendor:publish --tag=gritter-config (or provider tag).@gritterAssets directive or manual <script>/<link> tags from public/vendor/gritter.gritter()->success('Saved!', 'Record updated.');
return redirect()->route('home');
Then render in your Blade layout with {!! gritter()->render() !!} or the package’s included partial.gritter()->info(...) before redirect; the package stores messages in session and injects them on next request.gritter()->add('success', 'Title', 'Message', ['time' => 3000]);
gritter()->add('error', 'Oops', 'Something failed.');
return response()->json(['gritter' => gritter()->all()]);
Then render client‑side with the Gritter JS API.config/gritter.php (e.g., 'position' => 'top-right', 'time' => 5000).'enabled' => true) lets you turn off Gritter rendering entirely. Useful for environments where you want to suppress notifications (e.g., API responses) without removing calls.@include('gritter::scripts') or the package’s render method inside your layout after jQuery is loaded.gritter.enabled to false or use gritter()->fake() if supported to avoid session pollution.php artisan vendor:publish --tag=gritter-assets (or similar) to copy JS/CSS to public/vendor. Forgetting this leads to 404s.@stack('scripts') or include order carefully.config/gritter.php, run php artisan config:clear in development; in production, re‑cache.session middleware is active and the driver supports flash data (all standard drivers do).{!! gritter()->render() !!} near the end of <body> after jQuery; otherwise notifications may not appear or throw JS errors.gritter key (dd), assets loaded (network tab), JS console for errors, and that the render call is present.--tag=gritter-views) and customising the JS initialisation; or bind a custom implementation of the notification builder in a service provider.How can I help you explore Laravel packages today?