Support the ongoing development of Laravel.io →
Blade Views
Last updated 2 years ago.
0

I can recommend you to look at https://laravel.com/docs/5.5/blade#extending-blade What you can do is make your own Blade Directive that does this snippet of code. So it would become a bit like :

@admin_body 

or you can make a custom if statement directive

@administrator
   @include('component.adminbody')
@endadministrator
0

Sign in to participate in this thread!

Eventy

Your banner here too?

rannieollit einnar82 Joined 31 Oct 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.