Support the ongoing development of Laravel.io →
posted 5 years ago
Laravel
Last updated 1 year ago.
0

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.

0

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));
}
Last updated 5 years ago.
0

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. ;)

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Matias matilarab Joined 7 Nov 2018

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.