title: Pass json data to blade view from controller
body: <p>I am loading a json file from my resources folder resources/data/example.json</p>
  <pre><code>public function __construct()
  {
      // Load json file 
      $path = base_path('resources/data/rooms.json');
      $content = file_get_contents($path);
      $data = json_decode($content);
  }
  </code></pre>
  <p>my json file looks like this, it's a simple one just for an example:<code>[ { &quot;id&quot;:&quot;bicycle&quot;, &quot;category&quot;:&quot;vehicle&quot;, &quot;name&quot;:&quot;Bicycle One&quot;, &quot;images&quot;:[ &quot;/img/bike_slider_1.jpg&quot;, &quot;/img/bike_slider_2.jpg&quot; ], }, </code></p>
  <p>so now I am wondering how can I pass some of this data to the view which is e.g bikes.blade.php
  which looks like this:
  <code>@extends('layouts.default') @section('content')  &lt;main&gt;{{ content[1] }}&lt;/main&gt;</code></p>
  <p>any help will be appreciated :)</p>