title: Update settings table in database
body: <p>I have a problem with the update settings in my Laravel database.
  I can use the variable in my application but I want to update the variable change in my database
  My Table:
  <a href="https://i.stack.imgur.com/o2YeU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o2YeU.png" alt="enter image description here" /></a></p>
  <p>My Blade view:</p>
  <pre><code>&lt;form class=&quot;new-added-form&quot; action=&quot;{{route('update.setting')}}&quot; method=&quot;POST&quot; enctype=&quot;multipart/form-data&quot;&gt;
              &lt;div class=&quot;row&quot;&gt;
                  @csrf
                  @foreach($settings as $setting)
                  &lt;div class=&quot;col-xl-12 col-lg-12 col-12 form-group p-5&quot; style=&quot;border-bottom: 1px dotted #c5c5c5;&quot;&gt;
                  &lt;input type=&quot;hidden&quot; value=&quot;{{$setting-&gt;id}}&quot; name=&quot;set_id&quot;/&gt;
                      &lt;label for=&quot;app_name&quot;&gt;{{$setting-&gt;name}}:*&lt;/label&gt;
                      &lt;input type=&quot;text&quot; name=&quot;{{$setting-&gt;key}}&quot; id=&quot;app_name&quot; value=&quot;{{$setting-&gt;value}}&quot;&gt;
                      @if($setting-&gt;type == 1)
                      &lt;input type=&quot;file&quot;&gt;
                      &lt;img src=&quot;{{asset($setting-&gt;value)}}&quot; alt=&quot;{{$setting-&gt;name}}&quot; width=&quot;300&quot;&gt;
                      @endif
                      @error('APP_NAME')
                      &lt;span class=&quot;badge badge-warning&quot;&gt;{{$message}}&lt;/span&gt;
                      @enderror
                  &lt;/div&gt;
                  @endforeach
                  &lt;div class=&quot;col-12 form-group mg-t-8&quot;&gt;
  
                      &lt;button type=&quot;submit&quot; class=&quot;btn-fill-lg btn-gradient-yellow btn-hover-bluedark&quot;&gt;ذخیره&lt;/button&gt;
  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
  </code></pre>
  <p>My Controller:</p>
  <pre><code> public function update(Request $request)
  {
      ????
  }
  </code></pre>
  <p>How do I update a variable in my database?</p>