title: Generate random number in Laravel
body: <p>Please am working on a Project on Laravel and I wanted to Generate a Random Number in this format: one character in any position order and the rest integers. Example: C87465398745635, 87474M745436475, 98487464655378J8 etc. and this is my Controller: </p>
  
  <pre><code>    function generatePin( $number ) {
      $pins = array();
      for ($j=0; $j &lt; $number; $j++) { 
          $string = str_random(15);
          $pin = Pin::where('pin', '=', $string)-&gt;first();
          if($pin){
              $j--;
          }else{
              $pins[$j] = $string;
          }
      }
  
  
  
      return $pins;
  }
  </code></pre>
  
  <p>But it seems to be Generating something else like this: ZsbpEKw9lRHqGbv, i7LjvSiHgeGrNN8, pyJEcjhjd3zu9Su I have tried all I could but no success, Please any helping solution will be appreciated, Thanks</p>