diff --git a/app/Http/Controllers/AdministradorController.php b/app/Http/Controllers/AdministradorController.php index bb383b0ddf10aac309a834925d1e14a3ccf2aac5..ff443ff233de6c2d42893cd77f717d1980b83843 100644 --- a/app/Http/Controllers/AdministradorController.php +++ b/app/Http/Controllers/AdministradorController.php @@ -4,6 +4,13 @@ namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Administrador; +use App\User; +use App\GrandeArea; +use App\Avaliador; +use App\AdministradorResponsavel; +use App\Participante; +use App\Proponente; +use Illuminate\Support\Facades\Hash; use App\Evento; class AdministradorController extends Controller @@ -17,8 +24,8 @@ class AdministradorController extends Controller return view('naturezas.index'); } public function usuarios(){ - - return view('administrador.usuarios'); + $users = User::orderBy('name')->get(); + return view('administrador.usersAdmin')->with(['users' => $users]); } public function editais(){ @@ -28,4 +35,143 @@ class AdministradorController extends Controller return view('administrador.editais', ['eventos'=> $eventos]); } + + public function create() { + $grandesAreas = GrandeArea::orderBy('nome')->get(); + return view('administrador.novo_user')->with(['grandeAreas' => $grandesAreas]); + } + + public function salvar(Request $request) { + if ($request->tipo != "proponente") { + $validated = $request->validate([ + 'nome' => 'required', + 'tipo' => 'required', + 'email' => 'required|unique:users', + 'senha' => 'required', + 'confirmar_senha' => 'required', + 'cpf' => 'required|cpf|unique:users', + ]); + } else { + $validated = $request->validate([ + 'nome' => 'required', + 'tipo' => 'required', + 'email' => 'required|unique:users', + 'senha' => 'required', + 'confirmar_senha' => 'required', + 'cpf' => 'required|cpf|unique:users', + 'cargo' => 'required', + 'titulacaoMaxima' => 'required', + 'anoTitulacao' => 'required', + 'area' => 'required', + 'bolsistaProdutividade' => 'required', + 'nivel' => 'required', + 'linkLattes' => 'required', + ]); + } + + if (!($request->senha === $request->confirmar_senha)) { + return redirect()->back()->withErrors(['senha' => 'Senhas diferentes']); + } + + $user = new User(); + $user->name = $request->nome; + $user->tipo = $request->tipo; + $user->cpf = $request->cpf; + $user->email = $request->email; + $user->password = bcrypt($request->senha); + $user->save(); + + + switch ($request->tipo) { + case "administradorResponsavel": + $adminResp = new AdministradorResponsavel(); + $adminResp->user_id = $user->id; + $adminResp->save(); + break; + case "avaliador": + $avaliador = new Avaliador(); + $avaliador->user_id = $user->id; + $avaliador->save(); + break; + case "proponente": + $proponente = new Proponente(); + $proponente->SIAPE = $request->SIAPE; + $proponente->cargo = $request->cargo; + $proponente->vinculo = $request->vinculo; + $proponente->titulacaoMaxima = $request->titulacaoMaxima; + $proponente->anoTitulacao = $request->anoTitulacao; + $proponente->grandeArea = $request->area; + $proponente->area = "teste"; + $proponente->subArea = "teste"; + $proponente->bolsistaProdutividade = $request->bolsistaProdutividade; + $proponente->nivel = $request->nivel; + $proponente->linkLattes = $request->linkLattes; + $proponente->user_id = $user->id; + $proponente->save(); + break; + case "participante": + $participante = new Participante(); + $participante->user_id = $user->id; + $participante->save(); + break; + } + + return redirect( route('admin.usuarios') )->with(['mensagem' => 'Usuário cadastrado com sucesso']); + } + + public function edit($id) { + $user = User::find($id); + return view ('administrador.editar_user')->with(['user' => $user]); + } + + public function update(Request $request, $id) { + $user = User::find($id); + + $validated = $request->validate([ + 'nome' => 'required', + 'tipo' => 'required', + 'email' => 'required', + 'nova_senha' => 'required', + 'senha_atual' => 'required', + 'confirmar_senha' => 'required', + ]); + + if (!(Hash::check($request->senha_atual, $user->password))) { + return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']); + } + + if (!($request->nova_senha === $request->confirmar_senha)) { + return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']); + } + + $user->name = $request->nome; + $user->tipo = $request->tipo; + $user->email = $request->email; + $user->password = bcrypt($request->nova_senha); + $user->update(); + + return redirect( route('admin.usuarios') )->with(['mensagem' => 'Usuário atualizado com sucesso']); + } + + public function destroy($id) { + $user = User::find($id); + + $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); + $avaliador = Avaliador::where('user_id', '=', $id)->first(); + $proponente = Proponente::where('user_id', '=', $id)->first(); + $participante = Participante::where('user_id', '=', $id)->first(); + + if (!(is_null($adminResp))) { + $adminResp->delete(); + } else if (!(is_null($avaliador))) { + $avaliador->delete(); + } else if (!(is_null($proponente))) { + $proponente->delete(); + } else if (!(is_null($participante))) { + $participante->delete(); + } + + $user->delete(); + return redirect( route('admin.usuarios') )->with(['mensagem' => 'Usuário deletado com sucesso']); + } } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 6f51c5b126711c9b6bbc0a1fac43d5bce2b453ee..c28ad4015cc9d9d1394510a8b9c2fb2b184b036f 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -6,11 +6,14 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Validator; use App\User; +use App\AdministradorResponsavel; +use App\Avaliador; +use App\Proponente; +use App\Participante; use App\Endereco; use App\Trabalho; use App\Coautor; use App\Evento; -use App\Proponente; use Illuminate\Support\Facades\Log; class UserController extends Controller @@ -118,4 +121,20 @@ class UserController extends Controller 'trabalhos' => $trabalhos, ]); } + + public function minhaConta() { + $id = Auth::user()->id; + $user = User::find($id); + + $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); + $avaliador = Avaliador::where('user_id', '=', $id)->first(); + $proponente = Proponente::where('user_id', '=', $id)->first(); + $participante = Participante::where('user_id', '=', $id)->first(); + + return view('user.perfilUser')->with(['user' => $user, + 'adminResp' => $adminResp, + 'avaliador' => $avaliador, + 'proponente' => $proponente, + 'participante' => $participante]); + } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index ee8ca5bcd8f77d219f29529a9163587235c545d5..d006879e2204a42cd288114974fa029c162b5fe6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,6 +3,7 @@ namespace App\Providers; use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Facades\Validator; class AppServiceProvider extends ServiceProvider { @@ -23,6 +24,6 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // + Validator::extend('cpf', '\App\Utils\CpfValidation@validate'); } } diff --git a/app/Utils/CpfValidation.php b/app/Utils/CpfValidation.php new file mode 100644 index 0000000000000000000000000000000000000000..781ae08b60b81e5ba429f6b2ae1d37f9b3d5918b --- /dev/null +++ b/app/Utils/CpfValidation.php @@ -0,0 +1,26 @@ +isValidate($attribute, $value); + } + + protected function isValidate($attribute, $value) + { + $c = preg_replace('/\D/', '', $value); + if (strlen($c) != 11 || preg_match("/^{$c[0]}{11}$/", $c)) { + return false; + } + for ($s = 10, $n = 0, $i = 0; $s >= 2; $n += $c[$i++] * $s--); + if ($c[9] != ((($n %= 11) < 2) ? 0 : 11 - $n)) { + return false; + } + for ($s = 11, $n = 0, $i = 0; $s >= 2; $n += $c[$i++] * $s--); + if ($c[10] != ((($n %= 11) < 2) ? 0 : 11 - $n)) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/bootstrap/cache/.gitignore b/bootstrap/cache/.gitignore old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock index cf140f81600ef7e3070e555050554d7afa098ae2..c65988d4379f35297291b6f0cf053e4f7d8b8dce 100644 --- a/composer.lock +++ b/composer.lock @@ -41,33 +41,37 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "3fc171224a316569faad2df6b18a1fd8cce5a56d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/3fc171224a316569faad2df6b18a1fd8cce5a56d", + "reference": "3fc171224a316569faad2df6b18a1fd8cce5a56d", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -96,32 +100,38 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2019-10-30T19:59:35+00:00" + "time": "2020-05-25T20:08:47+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", - "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", "shasum": "" }, "require": { - "php": "^7.2" + "php": "^7.2 || ^8.0" }, "require-dev": { "doctrine/coding-standard": "^6.0", @@ -166,7 +176,7 @@ "parser", "php" ], - "time": "2019-10-30T14:39:59+00:00" + "time": "2020-05-25T17:44:05+00:00" }, { "name": "dragonmantank/cron-expression", @@ -387,16 +397,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.3", + "version": "6.5.4", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" + "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", - "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d", + "reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d", "shasum": "" }, "require": { @@ -404,7 +414,7 @@ "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.11" + "symfony/polyfill-intl-idn": "1.17.0" }, "require-dev": { "ext-curl": "*", @@ -450,7 +460,7 @@ "rest", "web service" ], - "time": "2020-04-18T10:38:46+00:00" + "time": "2020-05-25T19:35:05+00:00" }, { "name": "guzzlehttp/promises", @@ -576,20 +586,20 @@ }, { "name": "laravel/framework", - "version": "v6.18.11", + "version": "v6.18.16", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "73bc10bb23aab7539c8ffae6d5dc3c4b277de557" + "reference": "73f18a6bc58fb91aa83925161db25aa3674b73e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/73bc10bb23aab7539c8ffae6d5dc3c4b277de557", - "reference": "73bc10bb23aab7539c8ffae6d5dc3c4b277de557", + "url": "https://api.github.com/repos/laravel/framework/zipball/73f18a6bc58fb91aa83925161db25aa3674b73e9", + "reference": "73f18a6bc58fb91aa83925161db25aa3674b73e9", "shasum": "" }, "require": { - "doctrine/inflector": "^1.1", + "doctrine/inflector": "^1.4|^2.0", "dragonmantank/cron-expression": "^2.0", "egulias/email-validator": "^2.1.10", "ext-json": "*", @@ -610,6 +620,7 @@ "symfony/finder": "^4.3.4", "symfony/http-foundation": "^4.3.4", "symfony/http-kernel": "^4.3.4", + "symfony/polyfill-php73": "^1.17", "symfony/process": "^4.3.4", "symfony/routing": "^4.3.4", "symfony/var-dumper": "^4.3.4", @@ -718,7 +729,7 @@ "framework", "laravel" ], - "time": "2020-04-28T15:18:58+00:00" + "time": "2020-05-26T14:31:44+00:00" }, { "name": "laravel/tinker", @@ -840,16 +851,16 @@ }, { "name": "league/commonmark", - "version": "1.4.2", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "9e780d972185e4f737a03bade0fd34a9e67bbf31" + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/9e780d972185e4f737a03bade0fd34a9e67bbf31", - "reference": "9e780d972185e4f737a03bade0fd34a9e67bbf31", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", "shasum": "" }, "require": { @@ -910,46 +921,20 @@ "md", "parser" ], - "funding": [ - { - "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", - "type": "custom" - }, - { - "url": "https://www.colinodell.com/sponsor", - "type": "custom" - }, - { - "url": "https://www.paypal.me/colinpodell/10.00", - "type": "custom" - }, - { - "url": "https://github.com/colinodell", - "type": "github" - }, - { - "url": "https://www.patreon.com/colinodell", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/league/commonmark", - "type": "tidelift" - } - ], - "time": "2020-04-24T13:39:56+00:00" + "time": "2020-05-04T22:15:21+00:00" }, { "name": "league/flysystem", - "version": "1.0.67", + "version": "1.0.69", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e" + "reference": "7106f78428a344bc4f643c233a94e48795f10967" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", - "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967", + "reference": "7106f78428a344bc4f643c233a94e48795f10967", "shasum": "" }, "require": { @@ -1020,30 +1005,24 @@ "sftp", "storage" ], - "funding": [ - { - "url": "https://offset.earth/frankdejonge", - "type": "other" - } - ], - "time": "2020-04-16T13:21:26+00:00" + "time": "2020-05-18T15:13:39+00:00" }, { "name": "monolog/monolog", - "version": "2.0.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", - "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", + "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", "shasum": "" }, "require": { - "php": "^7.2", + "php": ">=7.2", "psr/log": "^1.0.1" }, "provide": { @@ -1054,11 +1033,11 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^6.0", "graylog2/gelf-php": "^1.4.2", - "jakub-onderka/php-parallel-lint": "^0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", + "php-parallel-lint/php-parallel-lint": "^1.0", "phpspec/prophecy": "^1.6.1", - "phpunit/phpunit": "^8.3", + "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90 <3.0", @@ -1107,20 +1086,20 @@ "logging", "psr-3" ], - "time": "2019-12-20T14:22:59+00:00" + "time": "2020-05-22T08:12:19+00:00" }, { "name": "nesbot/carbon", - "version": "2.33.0", + "version": "2.34.2", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b" + "reference": "3e87404329b8072295ea11d548b47a1eefe5a162" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", - "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/3e87404329b8072295ea11d548b47a1eefe5a162", + "reference": "3e87404329b8072295ea11d548b47a1eefe5a162", "shasum": "" }, "require": { @@ -1144,7 +1123,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "2.x-dev", + "dev-3.x": "3.x-dev" }, "laravel": { "providers": [ @@ -1179,17 +1159,7 @@ "datetime", "time" ], - "funding": [ - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2020-04-20T15:05:43+00:00" + "time": "2020-05-19T22:14:16+00:00" }, { "name": "nikic/php-parser", @@ -1245,16 +1215,16 @@ }, { "name": "opis/closure", - "version": "3.5.1", + "version": "3.5.3", "source": { "type": "git", "url": "https://github.com/opis/closure.git", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969" + "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/93ebc5712cdad8d5f489b500c59d122df2e53969", - "reference": "93ebc5712cdad8d5f489b500c59d122df2e53969", + "url": "https://api.github.com/repos/opis/closure/zipball/cac47092144043d5d676e2e7cf8d0d2f83fc89ca", + "reference": "cac47092144043d5d676e2e7cf8d0d2f83fc89ca", "shasum": "" }, "require": { @@ -1302,7 +1272,7 @@ "serialization", "serialize" ], - "time": "2019-11-29T22:36:02+00:00" + "time": "2020-05-25T09:32:45+00:00" }, { "name": "paragonie/random_compat", @@ -1600,16 +1570,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.3", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2bde2fa03e05dff0aee834598b951d6fc7c6fe02", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { @@ -1668,7 +1638,7 @@ "interactive", "shell" ], - "time": "2020-04-07T06:44:48+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -1933,20 +1903,6 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-30T11:41:10+00:00" }, { @@ -2000,20 +1956,6 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:56:45+00:00" }, { @@ -2070,20 +2012,6 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:54:36+00:00" }, { @@ -2140,20 +2068,6 @@ ], "description": "Symfony ErrorHandler Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-30T14:07:33+00:00" }, { @@ -2224,20 +2138,6 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:54:36+00:00" }, { @@ -2345,25 +2245,10 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-03-27T16:54:36+00:00" }, { "name": "symfony/http-foundation", - "version": "v4.4.8", "source": { "type": "git", @@ -2415,20 +2300,6 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-18T20:40:08+00:00" }, { @@ -2519,20 +2390,6 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-28T18:47:42+00:00" }, { @@ -2595,34 +2452,20 @@ "mime", "mime-type" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-17T03:29:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -2634,7 +2477,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2667,34 +2510,20 @@ "polyfill", "portable" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8" + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/c4de7601eefbf25f9d47190abe07f79fe0a27424", + "reference": "c4de7601eefbf25f9d47190abe07f79fe0a27424", "shasum": "" }, "require": { @@ -2706,7 +2535,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2740,34 +2569,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/3bff59ea7047e925be6b7f2059d60af31bb46d6a", + "reference": "3bff59ea7047e925be6b7f2059d60af31bb46d6a", "shasum": "" }, "require": { @@ -2781,7 +2596,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2816,34 +2631,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", + "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", "shasum": "" }, "require": { @@ -2855,7 +2656,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2889,34 +2690,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "f048e612a3905f34931127360bdd2def19a5e582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", + "reference": "f048e612a3905f34931127360bdd2def19a5e582", "shasum": "" }, "require": { @@ -2925,7 +2712,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -2958,34 +2745,20 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a760d8964ff79ab9bf057613a5808284ec852ccc", + "reference": "a760d8964ff79ab9bf057613a5808284ec852ccc", "shasum": "" }, "require": { @@ -2994,7 +2767,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -3030,21 +2803,7 @@ "portable", "shim" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-12T16:47:27+00:00" }, { "name": "symfony/process", @@ -3093,20 +2852,6 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-15T15:56:18+00:00" }, { @@ -3183,20 +2928,6 @@ "uri", "url" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-21T19:59:53+00:00" }, { @@ -3331,20 +3062,6 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-12T16:45:36+00:00" }, { @@ -3478,20 +3195,6 @@ "debug", "dump" ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], "time": "2020-04-12T16:14:02+00:00" }, { @@ -3545,20 +3248,20 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.3", + "version": "v3.6.5", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "1b3103013797f04521c6cae5560f604649484066" + "reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1b3103013797f04521c6cae5560f604649484066", - "reference": "1b3103013797f04521c6cae5560f604649484066", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8b64814b356b96a90d2bc942b152c80d8888b8d4", + "reference": "8b64814b356b96a90d2bc942b152c80d8888b8d4", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", + "php": "^5.4 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, @@ -3604,13 +3307,7 @@ "env", "environment" ], - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2020-04-12T15:18:03+00:00" + "time": "2020-05-23T09:42:03+00:00" } ], "packages-dev": [ @@ -3841,16 +3538,16 @@ }, { "name": "filp/whoops", - "version": "2.7.1", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130" + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", + "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", "shasum": "" }, "require": { @@ -3898,7 +3595,7 @@ "throwable", "whoops" ], - "time": "2020-01-15T10:00:00+00:00" + "time": "2020-05-05T12:28:07+00:00" }, { "name": "fzaninotto/faker", @@ -4090,30 +3787,33 @@ }, { "name": "mockery/mockery", - "version": "1.3.1", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be" + "reference": "6c6a7c533469873deacf998237e7649fc6b36223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", - "reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be", + "url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223", + "reference": "6c6a7c533469873deacf998237e7649fc6b36223", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": "^7.3.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0" + "phpunit/phpunit": "^8.0.0 || ^9.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -4151,7 +3851,7 @@ "test double", "testing" ], - "time": "2019-12-26T09:49:15+00:00" + "time": "2020-05-19T14:25:16+00:00" }, { "name": "myclabs/deep-copy", @@ -4832,16 +4532,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.4", + "version": "8.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23" + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8474e22d7d642f665084ba5ec780626cbd1efd23", - "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/63dda3b212a0025d380a745f91bdb4d8c985adb7", + "reference": "63dda3b212a0025d380a745f91bdb4d8c985adb7", "shasum": "" }, "require": { @@ -4911,17 +4611,7 @@ "testing", "xunit" ], - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-04-23T04:39:42+00:00" + "time": "2020-05-22T13:51:52+00:00" }, { "name": "scrivo/highlight.php", @@ -5704,6 +5394,5 @@ "platform": { "php": "^7.2" }, - "platform-dev": [], - "plugin-api-version": "1.1.0" + "platform-dev": [] } diff --git a/resources/lang/pt-BR/validation.php b/resources/lang/pt-BR/validation.php index 3210d11592b9b162b42b267924a4a8b1e04c62f9..9f4e343090835f4350e12d20157cd359d5956f58 100644 --- a/resources/lang/pt-BR/validation.php +++ b/resources/lang/pt-BR/validation.php @@ -27,6 +27,7 @@ return [ ], 'boolean' => ':Attribute deve ser verdadeiro ou falso.', 'confirmed' => 'A confirmação de :attribute não confere.', + 'cpf' => 'CPF invlálido', 'date' => ':Attribute não é uma data válida.', 'date_format' => ':Attribute não confere com o formato :format.', 'different' => ':Attribute e :other devem ser diferentes.', diff --git a/resources/views/administrador/editar_user.blade.php b/resources/views/administrador/editar_user.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..30f1abb94351c2c2a0038b10cdc140f1358479a0 --- /dev/null +++ b/resources/views/administrador/editar_user.blade.php @@ -0,0 +1,81 @@ +@extends('layouts.app') + +@section('content') + +
{{session('mensagem')}}
+Nome | +Tipo | +Data de Criação | +Opções | +
---|---|---|---|
+ {{ $user->name }} + | +{{ $user->tipo }} | +{{ $user->creaet_at }} | ++ | + +