You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error when trying to use a dynamically-defined Mailable. Not sure if it's a bug or just an anomaly.
2024-12-20 11:03:39.357 [error]
In Arguments.php line 15:
Call to undefined method App\Contexts\MethodCall::isAutoCompleting()
Mimimal Code Sample
<?phpnamespaceApp\Actions;
useApp\Models\Contact;
useApp\Models\DripMail;
useApp\Models\User;
useIlluminate\Support\Facades\Mail;
class SendDripMail
{
publicfunction__construct(
readonlyDripMail$dripMail,
) {}
publicfunctionhandle(
Contact$contact,
User$csr,
) {
// The DripMail model stores a Mailable class name as a string// e.g., 'App\Mail\WelcomeMail'// Extracting the mailable class name from the DripMail model// and creating a new instance of the mailable class is fine...$mailableClass = $this->dripMail->mailable;
$mailable = new$mailableClass(contact: $contact, csr: $csr);
// ...but this way causes the error in the Laravel VS Code extension 👇$mailable = new$this->dripMail->mailable(contact: $contact, csr: $csr);
Mail::to($contact)->queue($mailable);
// As does this way 👇
Mail::to($contact)->queue(new$this->dripMail->mailable(contact: $contact, csr: $csr));
}
}
The text was updated successfully, but these errors were encountered:
Extension Version
0.1.14
PHP Binary
Herd
Operating System
macOS
What happened?
I get this error when trying to use a dynamically-defined Mailable. Not sure if it's a bug or just an anomaly.
Mimimal Code Sample
The text was updated successfully, but these errors were encountered: