Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
/ utils Public archive

Paquete de uso personal con cosas que uso día a día...


Notifications You must be signed in to change notification settings


Repository files navigation


Latest Version on Packagist GitHub Tests Action Status Total Downloads GitHub forks GitHub license

Un simple paquete de php que puede servir de utilidad a cualquiera con muchas herramientas que facilitan el desarrollo de proyectos mucho más rápido.

how to install

composer require abr4xas/utils


$ composer update
$ composer dumpautoload -o // optional

how to use


require 'vendor/autoload.php';

use Abr4xas\Utils\SeoUrl;
use Abr4xas\Utils\Gravatar;
use Abr4xas\Utils\TimeFormat;
use Abr4xas\Utils\SuggestKeyword;
use Abr4xas\Utils\PrettyPrintArray;

$slug = SeoUrl::generateSlug('this is an awesome string');
// this-is-an-awesome-string

$gravatar = Gravatar::getAvatarUrl('email@domain.tld', ['s' => 80, 'd' => 'mm', 'secure' => true]);

$timeAgo = TimeFormat::timeAgo('2020-08-25');
// 21 hours ago


$keywords = SuggestKeyword::SuggestKeyword('php');


// Output:

// Array
// (
//     [0] => php
//     [1] => phpmyadmin
//     [2] => php date
//     [3] => phpstorm
//     [4] => php online
//     [5] => php array length
//     [6] => php foreach
//     [7] => phpunit
//     [8] => php array
//     [9] => php try catch
// )

random string generator usage


use Abr4xas\Utils\RandomStringGenerator;

$token = (new RandomStringGenerator)->generate();

custom alphabet


$customAlphabet = '0123456789ABCDEF';

// you can set the custom alphabet from the constructor
$token = (new RandomStringGenerator($customAlphabet))->generate();

// or you can set a new alphabet whenever needed like this:

$token = (new RandomStringGenerator)->setAlphabet($customAlphabet)->generate();


composer test


Please see CHANGELOG for more information on what has changed recently.


Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.



The MIT License (MIT). Please see License File for more information.