--- title: 'You can use @includeWhen to include certain Blade partials when some condition is met. For instance, when the current user is an admin' tweet_id: '1482036560354676737' thread_slug: weekly-thread-2022-02 author_username: marcelpociot images: - 'https://pbs.twimg.com/media/FI47GaYXMAI7SeA.jpg' created_at: 2022-01-14T17:07:05+00:00 slug: you-can-use-at-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.