title: Error in save() after an function in Laravel
body: <p>I am trying to implement the <code>save()</code> method after the <code>self::restrictionMinimunBid($ request, $ karateka, $ bid)</code> function, but I get the following error: <code>"Method App\\Http\\Controllers\\BidController::save does not exist."</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>$bid = Bid::where('id_participants', '=', $request-&gt;id_participant)
          -&gt;where('id_karatekas', '=',$market-&gt;id_karatekas)
          -&gt;where('bid', '=',$request-&gt;bid);
  
          if(!$bid-&gt;count()){
           $bid-&gt;id_market = $market-&gt;id;
           $bid-&gt;id_group = $market-&gt;id_group;
           $bid-&gt;id_karatekas = $market-&gt;id_karatekas;                        
           $bid-&gt;id_participants = $request-&gt;id_participant;                                    
           self::restrictionMinimunBid($request, $karateka, $bid);
           $bid-&gt;save();                                    
           $response = array('code' =&gt; 200, 'Bid' =&gt; $bid, 'msg' =&gt; 'Bid created'); 
           }else{
           $response = array('code' =&gt; 400, 'error_msg' =&gt; "Bid already registered.");
           }
   public function restrictionMinimunBid(Request &amp; $request, $karateka, &amp; $bid)
      {
          $allKaratekas = Karateka::all()
          -&gt;map(function ($allKaratekas) use ($karateka, $request, $bid){
                  if($karateka-&gt;id == $allKaratekas-&gt;id ){
                     if($request-&gt;bid &gt; $allKaratekas-&gt;value){
                      $bid-&gt;bid = $request-&gt;bid;
                      $msg ="The bid is more than the value of karateka";
                      var_dump($msg);
  
                     }
                     else{
                         $error ="The bid is less than the value ofmkarateka";
                         var_dump($error);
                     }
                  }
          });
      }
  
  </code></pre>