title: status active or inactive withour page refresh
body: <p>In my laravel project I have done the status Active On or OFF without any jquery or ajax. But right now i want to apply ajax. because this code take page refresh, so i don't want the page refresh. so can anyone tell me how can I apply the ajax in this code. Here I put my route controller function and blade code. so plz tell me how to achieve this.
  This is my blade </p>
  
  <pre><code>       &lt;tr&gt;&lt;td&gt;21&lt;/td&gt;&lt;td&gt;Featured Image On Home Page&lt;/td&gt;
              &lt;td&gt;
                   &lt;a href="{{url('knowledgebasehomeImageblock')}}"&gt;
                    @if($settingval[0]-&gt;homeimg_block==1)
                    {!! '&lt;div class ="text-success text-toggle-color"&gt;&lt;i class="fa fa-toggle-on fa-2x" aria-hidden="true"&gt;&lt;/i&gt;
                  &lt;/div&gt;' !!}
                  @else
                  {!! '&lt;div class="text-secondary"&gt;&lt;i class="fa fa-toggle-off fa-2x" aria-hidden="true"&gt;&lt;/i&gt;
                &lt;/div&gt;' !!}
                @endif 
              &lt;/a&gt;
              &lt;/td&gt;
            &lt;/tr&gt; 
  </code></pre>
  
  <p>This is my route</p>
  
  <pre><code>Route::get('knowledgebasehomeImageblock','knowledgebaseSettingController@homeimageblock');
  </code></pre>
  
  <p>This is my controller</p>
  
  <pre><code>    public function listimageblock(){
        $statusvalue = DB::table('knowledgebaseSetting')-&gt;get()-&gt;toArray();
        $retVal = ($statusvalue[0]-&gt;listimg_block==1) ? 0 : 1 ;
        $colFeatured = array('listimg_block' =&gt;$retVal);
        DB::table('knowledgebaseSetting')-&gt;update($colFeatured);
        return Redirect::back()-&gt;with('message','Display featuredblock updated successfully!'); 
      }
  </code></pre>