title: Laravel Blade access object property using variable
body: <p>In a blade template y controller passes a object which has few values in properties as bellow </p>
  
  <pre><code>value_L1 = "Hello"
  value_L2 = "Stack"
  value_L3 = "OverFlow"
  </code></pre>
  
  <p>I want to use a for loop to display these values but the statement in loop returns null, how can I do such a thing in blade?</p>
  
  <pre><code>@for ($count = 1; $count &lt; 3; $count++)
      {{ $object-&gt;{'value_L.$count'} }}
  @endfor
  </code></pre>
  
  <p>I am able to access these properties as following</p>
  
  <pre><code>{{ $object-&gt;value_L1 }}
  {{ $object-&gt;value_L2 }}
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>K</p>