title: Laravel Edit View not prefilling values
body: <p>I am working on a Laravel 9 project that I inherited, and this is my first exposure to Laravel, so please forgive my ignorance.</p>
  <p>I have been trying to get my edit views with components to prefill with the existing data, but nothing that I do will prefill these fields with current values from the model/database. Here is my <code>edit.blade.php</code>. I cannot seem to set the <code>value</code> property on this <code>x-input</code> component.</p>
  <pre><code>...
  &lt;form action=&quot;{{ route('users.update', $users) }}&quot; method=&quot;post&quot;&gt;
  @method('put')
  @csrf
  &lt;x-input
      type=&quot;text&quot;
      name=&quot;name&quot;
      fieldtitle=&quot;name&quot;
      placeholder=&quot;Name&quot;
      class=&quot;w-full&quot;
      autocomplete=&quot;off&quot; 
      :value=&quot;@old('name', $users-&gt;name)&quot;&gt;
  &lt;/x-input&gt;
      
  &lt;x-input
      type=&quot;text&quot;
      name=&quot;email&quot;
      fieldtitle=&quot;email&quot;
      placeholder=&quot;Email&quot;
      class=&quot;w-full&quot;
      autocomplete=&quot;off&quot;
      :value=&quot;@old('email', $users-&gt;email)&quot;&gt;
  &lt;/x-input&gt;
  
  &lt;x-button class=&quot;mt-6&quot;&gt;Save User&lt;/x-button&gt;
  </code></pre>
  
  <p>The <code>x-input</code> input component is in <code>resources/views/components</code>. While bubbling around, I did discover that if I remove <code>'value' =&gt; ''</code> from <code>@props</code>, the values will prefill, but it would be a mistake to leave it this way without understanding why! Here is <code>input.blade.php</code></p>
  <pre><code>@props(['disabled' =&gt; false, 'fieldtitle' =&gt; '', 'value' =&gt; ''])
  
  &lt;input {{ $disabled ? 'disabled' : '' }} {!! $attributes-&gt;merge(['class' =&gt; 'rounded-md shadow-sm border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50']) !!}&gt;
  
  @error($fieldtitle)
      &lt;div class=&quot;text-red-600 text-sm&quot;&gt;{{ $message }}&lt;/div&gt;
  @enderror
  </code></pre>
  <p>Here is my view in the browser
  <a href="https://i.stack.imgur.com/Xpvui.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Xpvui.png" alt="enter image description here" /></a><br><br>
  I do not think I should make this change permanent without understanding what and why!</p>
  <p><strong>Question(s)</strong>
  So my question is multifaceted. Why can <code>value</code> be assigned when it is not in <code>@props</code>? What is <code>@props</code> for? What is the proper way to handle this situation? Are you aware of any good training on this subject?</p>