You can use @includeWhen to include certain Blade partials when some condition is met. For instance, when the current user is an admin

You can use @includeWhen to include certain Blade partials when some condition is met. For instance, when the current user is an admin

Make use of the built-in "includeWhen" and "includeUnless" directives to get rid of those ugly if conditions.

We're writing a book, you can get it for free here.