I get this error when i try to send the mail
ErrorException thrown with message "Trying to get property 'mail' of non-object"
Stacktrace:
#56 ErrorException in C:\xamppNew\htdocs\laravelapps\procurement\app\Http\Controllers\EmailController.php:37
#55 Illuminate\Foundation\Bootstrap\HandleExceptions:handleError in C:\xamppNew\htdocs\laravelapps\procurement\app\Http\Controllers\EmailController.php:37
#54 App\Http\Controllers\EmailController:sendmail in C:\xamppNew\htdocs\laravelapps\procurement\vendor\laravel\framework\src\Illuminate\Routing\Controller.php:54
...
What happens when you do dump($task)
inside the foreach does it have an email property (eg is it an object or an array)? or should you be calling it as $task['mail']
?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community