LaravelBook\Laravel4Powerpack\Str::random PHP Method

random() public method

Generate a 40 character random alpha-numeric string echo Str::random(40); Generate a 16 character random alphabetic string echo Str::random(16, 'alpha');
public random ( integer $length, string $type = 'alnum' ) : string
$length integer
$type string
return string
    public function random($length, $type = 'alnum')
    {
        return substr(str_shuffle(str_repeat($this->pool($type), 5)), 0, $length);
    }