title: Blade I Can't Use Veriable Directly
body: <p>When I try this;<br></p>
  <pre><code>&lt;i class=&quot;down fa fa-arrow-down @if($post-&gt;is_down) active @endif&quot;&gt;&lt;/i&gt;
  </code></pre>
  <p>Active class not showing. But when I do that;<br></p>
  <pre><code>@php
  $a = $post-&gt;is_down;
  @endphp
  &lt;i class=&quot;down fa fa-arrow-down @if($a) active @endif&quot;&gt;&lt;/i&gt;
  </code></pre>
  <p>It's working well. Why that happening? How can I use it directly?<br></p>
  <p>Note: <strong>is_down</strong> is appended veriable.</p>
  <p>Function inside Post model file;</p>
  <pre><code>public function getIsDownAttribute($value){
          return $this-&gt;attributes['is_down'] = in_array(Auth::user()-&gt;id ?? 0,(array)json_decode($this-&gt;attributes['down']));
      }
  </code></pre>