public function uniqueNumber($table, $column, $size, $withSpecialCharacters = false)
    {
        do {
            $token = $this->randomNumber($size, $withSpecialCharacters);

            $exists = DB::table($table)->where($column, $token)->exists();
        } while ($exists);

        return $token;
    }
public function uniqueNumber($table, $column, $size, $withSpecialCharacters = false)
    {
        do {
            $token = $this->randomNumber($size, $withSpecialCharacters);

            $exists = DB::table($table)->where($column, $token)->exists();
        } while ($exists);

        return $token;
    }
public function uniqueNumber ( $ table , $ column , $ size , $ withSpecialCharacters = false ) { do { $ token = $ this -> randomNumber ( $ size , $ withSpecialCharacters ) ; $ exists = DB :: table ( $ table ) -> where ( $ column , $ token ) -> exists ( ) ; } while ( $ exists ) ; return $ token ; }
Create a unique number.

@param string $table
@param string $column
@param $size
@param bool $withSpecialCharacters
@return integer
@throws \Exception
Create a unique number .