2017 © Pedro Peláez
 

library chilean-credentials

Chilean credentials package for PHP (Rut and Passport)

image

mathiasd88/chilean-credentials

Chilean credentials package for PHP (Rut and Passport)

  • Monday, May 21, 2018
  • by mathiasd88
  • Repository
  • 1 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Framework Agnostic Chilean Credentials Package

Build Status, (*1)

A Chilean RUT credentials package for PHP 5.6+., (*2)

Installation

Require this package with composer:, (*3)

composer require mathiasd88/chilean-credentials

Then use the class wherever you want using:, (*4)

use Mathiasd88\ChileanCredentials\Rut;

Usage

Examples:

If you want to validate a rut:, (*5)

return (new Rut('15082666', '7'))->isValid(); // returns true
return (new Rut('15082666', 'K'))->isValid(); // returns false

If you want to get the "digito verificador" of a given rut:, (*6)

return (new Rut('15082666'))->dv(); // returns 7

If you want to create a valid rut:, (*7)

return new Rut(); // returns a valid rut, for example: '23932394-4'

Tests

You can run all the tests using phpunit., (*8)

vendor/phpunit/phpunit/phpunit tests --colors

The Versions

21/05 2018

dev-master

9999999-dev https://github.com/mathiasd88/chilean-credentials

Chilean credentials package for PHP (Rut and Passport)

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

by Mathias Donoso

laravel passport credentials rut chile