Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Snapey's avatar

ok, when you create a blade component, your code has to actually be proven to work.

We can't tell in your question WHAT user()->permissions() actually returns. This is not an issue with blade.

You need to convert the output to an array if you want to use in_array.

Alternatively use the collection method contains()

1 like
haztakki's avatar

Thank you! I just needed to use the toArray() method.

Previous

Please or to participate in this conversation.