Support the ongoing development of Laravel.io →
Mail Architecture Testing
Last updated 2 years ago.
0

Its because of how anonymous functions work. You have to explicitly tell them what variables you want to use inside their scope.

PHP.net Anonymous functions Example #3.

Its not Laravel related but PHP related. You already have a use statement for that closure, so add your additional vars needed to it.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

anelito anelito Joined 8 Jun 2015

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.