Error in array in view file

Posted 1 year ago by arslan2037

I want to show data from array, but i have error and i am not able to find out why it gives me error, this is what i have in controller file, $json = file_get_contents($url);

                return view('store.show', compact('json'));

and this is in view file

    <?php 
    $leads = json_decode($json, true);

    $media = $leads['user']['media']['nodes'];

    dd($media);
    ?>

this code show data but when i try to show it using loop it gives me error

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.