title: how to call a static method in another static method in the same model laravel
body: <p>I created a static method to help me know what mobile OS app my users upload. </p>
  
  <pre><code>public static function knowAppPlatform($file){
      $extension=  $file-&gt;getClientOriginalExtension();
      if ($extension=== "apk"){
  
          return 'android';
      }
      elseif ($extension=== "appx"){
  
          return 'windows';
      }
      elseif ($extension=== "ipa"){
  
          return 'ios';
      }
  }
  </code></pre>
  
  <p>Then i tried to call that same static method in another method in the same model. but it keeps returning a null, it works fine outside the model but not inside.</p>
  
  <pre><code> public static function uploadScreenshot($file){
      $platform = static::knowAppPlatform($file);
       dd($platform);
      $name = Auth::id() . 'screenshots' . time(). '.' . $file-&gt;getClientOriginalExtension();
      $name = $file-&gt;storeAs('mobileApps/screenshots', $name);
      return $name;
  }
  </code></pre>
  
  <p>I have researched here on stack overflow and implemented some of the answers, yet no show. </p>
  
  <p>I have tried, </p>
  
  <pre><code>$platform = static::knowAppPlatform($file);
  $platform = self::knowAppPlatform($file);
  $platform = \App\model\students\App::knowAppPlatform($file);
  </code></pre>