title: How to pass parameter to getFooAttribute() megic method from view on Laravel 5.8
body: <p>I'm newbie in Laravel. I would like to pass parameter from view side to getFooAttribute method. Below is my needed method.</p>
  
  <pre><code>class Patient extends Model
  {
      public function getFooAttribute($paramfromview){
          return SomeModel::find($paramfromview);
      } 
  }
  </code></pre>
  
  <p>This is code from view side.</p>
  
  <pre><code>&lt;div class="form-group"&gt;
     &lt;label&gt;ID&lt;/label&gt;
      &lt;input type="text" name="some" value="{{$somepatient-&gt;foo($someparameter)}}" class="form-control" &gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm not sure is it possible to do that. Any advise or guidance would be greatly appreciated, Thanks.</p>