Package Data | |
---|---|
Maintainer Username: | jailtonsc |
Maintainer Contact: | jailton.dos.santos.cruz@gmail.com (Jailton S. C.) |
Package Create Date: | 2016-07-30 |
Package Last Update: | 2018-01-12 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:09:15 |
Package Statistics | |
---|---|
Total Downloads: | 2,842 |
Monthly Downloads: | 62 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Validador de cnpj com suporte para laravel 5.*
composer require jailtonsc/validador-cnpj-laravel
No arquivo config/app.php
em providers coloque
ValidadorCnpj\CnpjServiceProvider::class
php artisan vendor:publish
namespace App\Http\Requests;
use App\Http\Requests\Request;
class ArquivoRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'cnpj' => 'cnpj'
];
}
}
ou
$this->validate($request, [
'cnpj' => 'cnpj',
]);