Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

spatie/spatie.be

493 stars
3 code files
View spatie/spatie.be on GitHub

app/Providers/ViewServiceProvider.php

Open in GitHub
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
 
class ViewServiceProvider extends ServiceProvider
{
public function boot()
{
Blade::directive('svg', function ($expression) {
return "<?php echo svg({$expression}); ?>";
});
 
//
}
}

resources/views/front/pages/vacancies/partials/offer.blade.php

Open in GitHub
// ...
 
<ul class="bullets bullets-green">
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> A competitive salary package that can be tailored to your personal needs</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Health insurance</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Meal vouchers</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Eco vouchers</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Velo card for public bikes in Antwerp</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Laptop + 2<sup>nd</sup> screen, smartphone</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Internet at home</li>
<li><span class="icon">{{ svg('icons/far-angle-right') }}</span> Bose noise-cancelling headphones</li>
</ul>
 
// ...

config/app.php

Open in GitHub
return [
//
'providers' => [
//
Illuminate\View\ViewServiceProvider::class,
//
],
//
];

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.