Including SVG contents in Laravel 5 Blade template
Similar to the accepted answer but a bit cleaner (imo). Use the laravel directive to extend blade, like so (in your App Service Provider, as outlined here): \Blade::directive(‘svg’, function($arguments) { // Funky madness to accept multiple arguments into the directive list($path, $class) = array_pad(explode(‘,’, trim($arguments, “() “)), 2, ”); $path = trim($path, “‘ “); $class … Read more