Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
cosas fortify
Browse files Browse the repository at this point in the history
  • Loading branch information
rats4final committed Dec 1, 2022
1 parent a31caf6 commit b536aeb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 9 deletions.
5 changes: 3 additions & 2 deletions app/Actions/Fortify/CreateNewUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CreateNewUser implements CreatesNewUsers
public function create(array $input)
{
Validator::make($input, [
'name' => ['required', 'string', 'max:255'],
//'name' => ['required', 'string', 'max:255'],
'email' => [
'required',
'string',
Expand All @@ -34,10 +34,11 @@ public function create(array $input)
])->validate();

return User::create([
'name' => $input['name'],
//'name' => $input['name'],
'email' => $input['email'],
'username' => $input['username'],
'password' => Hash::make($input['password']),
'rol' => 1,
]);
}
}
25 changes: 23 additions & 2 deletions resources/views/admin/Persona/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<h2>Personas</h2>
</div>
<div class="card-body">
<a href="{{ route('personas.create') }}" class="btn btn-success btn-sm" title="Añadir nueva Persona">
<a href="{{ route('personas.create') }}" class="btn btn-success btn-sm"
title="Añadir nueva Persona">
<i class="fa fa-plus" aria-hidden="true"></i> Nueva Persona
</a>
<br>
Expand Down Expand Up @@ -39,7 +40,27 @@
<td>{{ $persona->cel_per }}</td>
<td>{{ $persona->fecha_nac }}</td>
<td>{{ $persona->num_seguro }}</td>
<td>{{ $persona->donante }}</td>
<td>
@if ($persona->donante == 1)
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor"
class="bi bi-check-square-fill" viewBox="0 0 16 16">
<path
d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm10.03 4.97a.75.75 0 0 1 .011 1.05l-3.992 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.75.75 0 0 1 1.08-.022z" />
</svg>
@else
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor" class="bi bi-clipboard-x"
viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M6.146 7.146a.5.5 0 0 1 .708 0L8 8.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 9l1.147 1.146a.5.5 0 0 1-.708.708L8 9.707l-1.146 1.147a.5.5 0 0 1-.708-.708L7.293 9 6.146 7.854a.5.5 0 0 1 0-.708z" />
<path
d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z" />
<path
d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z" />
</svg>
@endif
</td>
<td>{{ $persona->tipo_sangre->nombre_tipo_sangre }}</td>
<td>{{ $persona->pariente->nombre_per }}</td>
<td>
Expand Down
5 changes: 0 additions & 5 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ class="peer placeholder-transparent h-10 w-full border-b-2 border-gray-300 text-
class="absolute left-0 -top-3.5 text-gray-600 text-sm peer-placeholder-shown:text-base peer-placeholder-shown:text-gray-440 peer-placeholder-shown:top-2 transition-all peer-focus:-top-3.5 peer-focus:text-gray-600 peer-focus:text-sm">Nombre
</label>
</div>
@error('name')
<div class="relative">
<span class="text-red-700 text-sm">{{ $message }}</span>
</div>
@enderror
<div class="relative">
<input id="email" name="email" type="email"
class="peer placeholder-transparent h-10 w-full border-b-2 border-gray-300 text-gray-900 focus:outline-none focus:borer-rose-600"
Expand Down

0 comments on commit b536aeb

Please sign in to comment.