title: How does the abstract Model class in laravel handle static dynamic method calls such as "::find()", "::where()" etc
body: <p>I am learning how some features are being implemented in laravel, because i want to understand some software design techniques and principles. </p>
  
  <p>i understand that when a static method call such as "App\User::find(1) or App\User::whereId(1)" are made on an eloquent model that the abstract model class implements a magic method "__callStatic" like so : </p>
  
  <pre><code>/**
   * Handle dynamic static method calls into the method.
   *
   * @param  string  $method
   * @param  array  $parameters
   * @return mixed
   */
  public static function __callStatic($method, $parameters)
  {
      $instance = new static;
      return call_user_func_array([$instance, $method], $parameters);
  }
  </code></pre>
  
  <p>I also understand that this line '$instance = new static;' makes an instance of whatever eloquent model in which the static call was made e.g App\User. </p>
  
  <p>However i don't completely understand whats going on in the next line "call_user_func_array([$instance, $method], $parameters);".</p>
  
  <p>From what i have learnt so far the function call_user_func_array() is suppose to call the $method(e.g find($parameters) ) on the eloquent model instance (e.g App\user).</p>
  
  <p>But i dont understand why that is not the case,and i discovered that method do not exist on the eloquent model. i tried calling a none existing method like "blah()" :</p>
  
  <pre><code>App\User::blah();
  </code></pre>
  
  <p>But i get the exception "BadMethodCallException with message 'Call to undefined method Illuminate\Database\Query\Builder::fisd()'".</p>
  
  <p>Please how is the class "Builder" entering the scene ? </p>
  
  <p>why is the exception not ""BadMethodCallException with message 'Call to undefined method Illuminate\Database\Eloquent\Model::fisd()'"" ? </p>
  
  <p>i cannot see the model class extending Builder Class.</p>