title: Call to a member function save() on array laravel
body: <p>Im doing the update method. When I tried to update the specific data, im getting this error "Call to a member function save() on array". Why? Is there's something missing in my codes?</p>
  
  <p>I also tried to print_r the $result variable, it has a value..</p>
  
  <p><strong>View</strong></p>
  
  <pre><code>@extends('dashboard')
  @section('content')
  
  &lt;br&gt;&lt;br&gt;
  &lt;div class="x_content"&gt;
    &lt;table class="table table-hover"&gt;
       &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;#&lt;/th&gt;
          &lt;th&gt;Text Header&lt;/th&gt;
          &lt;th&gt;Text Description&lt;/th&gt;
          &lt;th&gt;Action&lt;/th&gt;
          &lt;th&gt;Updated At&lt;/th&gt;
          &lt;th&gt;Created At&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        @foreach($data as $text)
        &lt;tr&gt;
          &lt;th scope="row"&gt;{{ $text-&gt;id }}&lt;/th&gt;
          &lt;td&gt;{{ $text-&gt;text_header}}&lt;/td&gt;
          &lt;td&gt;{!! nl2br(e($text-&gt;text_description)) !!}&lt;/td&gt;
          &lt;td&gt;&lt;button class = "btn btn-info btn-md" data-toggle="modal" data-target="#myModal-{{$text-&gt;id}}"&gt;&lt;i class="fa fa-pencil-square-o" aria-hidden="true"&gt;&lt;/i&gt; Edit&lt;/button&gt;&lt;/td&gt;
          &lt;div class="modal fade" id="myModal-{{$text-&gt;id}}" tabindex="-1" role="dialog" aria-labelledby="titleLabel"&gt;
            &lt;div class="modal-dialog" role="document"&gt;
              &lt;div class="modal-content"&gt;
                &lt;div class="modal-header modal-header-success"&gt;
                  &lt;button type="button" class="close btn btn-primary" data-dismiss="modal" aria-label="Close"&gt;
                  &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="titleLabel"&gt;New Content&lt;/h4&gt;
                &lt;/div&gt;
                &lt;div class="modal-body"&gt;
                  &lt;div class="row"&gt;
                    &lt;div class ="col-md-2 col-lg-7"&gt;
                      &lt;div style="display: inline"&gt;
                        &lt;div class="form-group"&gt;
                            &lt;form action="{{ url('updateText/'.$text-&gt;id) }}" enctype="multipart/form-data" method="POST"&gt;
                             {{ csrf_field() }}
                            &lt;label&gt;Title Header&lt;/label&gt;
                            &lt;input type= "text" name = "title_header"value =" {{ $text-&gt;text_header}}" class = "form-control"&gt;&lt;/input&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class ="col-md-4 col-lg-9"&gt;
                        &lt;div class="form-group"&gt;
                            &lt;label&gt;Title Description&lt;/label&gt;
                            &lt;textarea style="resize:none"&gt; {{ $text-&gt;text_description}}&lt;/textarea&gt;
                        &lt;/div&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-danger" data-dismiss="modal"&gt;Close&lt;/button&gt;&amp;nbsp;
                  &lt;span class="pull-right"&gt;
                     &lt;button type="submit" class="btn btn-success"&gt;Update&lt;/button&gt;
                  &lt;/span&gt;
                &lt;/form&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;td&gt;{{ $text-&gt;updated_at}}&lt;/td&gt;
          &lt;td&gt;{{ $text-&gt;created_at}}&lt;/td&gt;
  
        &lt;/tr&gt;
  
        @endforeach
        {{ $data-&gt;links() }}
  
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
  @stop
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function updateText(Request $request, $id)
  {
  
      $result = $request-&gt;all();
      $test = $result-&gt;save();
      print_r($test);die;
  
      Session::flash('flash_message', 'Task successfully added!');
  
      return redirect()-&gt;back();
  }
  </code></pre>
  
  <p><strong>Route</strong></p>
  
  <pre><code>Route::post('updateText/{id}','AdministratorController@updateText');
  </code></pre>