It sounds like the view is trying to cast an array to a string. As a first step, check the variables your view is using and make sure it's only trying to use strings, things that can be toStringed to output human readable data.
I converted my array into a string and when I use dd on my array or string I can see my values, but I keep getting the same message on slack, only "Array".
Edit: After adding my variables again it worked. Thanks for the help!
public function index()
{
$reord = Product::select('Product_Name')->where('Number_Runs', '<=', '5')->get();
$reorde = json_decode(json_encode($reord), true);
$reorder = implode(', ', array_flatten($reorde));
Notification::route('slack', 'https://hooks.slack.com/services/T7CM4ADHU/......./.....')->notify(new InventoryReStock($reorder));
}
Excellent! Glad to hear it’s working.
Sounds like I didn’t provide too much help, but I’ve got boatloads of nothing; you can come back for more anytime. ;)
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community