title: in laravel error Invalid argument supplied for foreach() (View: i cant see $value
body: <p>I am trying to make a blog foreach  that see this erro
  Invalid argument supplied for foreach() (View:</p>
  
  <p>my site <a href="https://weadam.com/" rel="nofollow noreferrer">https://weadam.com/</a></p>
  
  <p>my code is:
  controller:</p>
  
  <pre><code> public function index()
      {
          $localetmp = Session::get('locale');
          $blogs = @json_decode(file_get_contents("https://www.weadam.com/blogs/wp-json/wp/v2/posts?per_page=4&amp;lang=" . $localetmp));
          $blogsold = Blog::orderBy('id','desc')-&gt;take(100)-&gt;get();
  
          foreach ((array)$blogs as $blog){
              // $blog-&gt;elapsed = $this-&gt;time_elapsed_string('@'.$blog-&gt;date);
              // $blog-&gt;date = date("d F Y",$blog-&gt;date);
          }
          $error = "";
          return view('home-new',['blogs' =&gt; $blogs]);
      }
  </code></pre>
  
  <p>and view is:</p>
  
  <pre><code>&lt;div class="eng-home-blog"&gt;
                  &lt;div class="col-sm-9 home-post-disp bx-shadow brd-radius bg-white"&gt;
                      @foreach($blogs as $blog)
                          @if($blog-&gt;sticky)
                              &lt;img src="{{$blog-&gt;fimg_url}}" alt="" class="img-responsive brd-radius bx-shadow"&gt;
                              &lt;div class="hm-post-date"&gt;{{$blog-&gt;date}}&lt;/div&gt;
                              &lt;h3&gt;{{$blog-&gt;title-&gt;rendered}}&lt;/h3&gt;
                              &lt;p&gt;{!!$blog-&gt;excerpt-&gt;rendered!!}&lt;/p&gt;
                              &lt;span&gt;&lt;a href="{{$blog-&gt;link}}" target="_blank"&gt;{{__("READ MORE")}}&lt;/a&gt;&lt;/span&gt;
                          @endif
                      @endforeach
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>