This repository has been archived by the owner on Apr 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
137 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
|
||
namespace App\Http\Requests; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class EditEspecialidadRequest extends FormRequest | ||
{ | ||
|
||
public function authorize() | ||
{ | ||
return true; | ||
} | ||
|
||
public function rules() | ||
{ | ||
|
||
return [ | ||
'nombre_especialidad' => 'required|string|min:5|max:40|unique:especialidades,nombre_especialidad,'.$this->id_especialidad . '",id_especialidad', | ||
'descripcion_especialidad' => 'required|string|min:5|max:40', | ||
|
||
]; | ||
} | ||
public function messages() | ||
{ | ||
return [ | ||
'nombre_especialidad.required' => 'Es neceserio que este campo este llenado', | ||
'nombre_especialidad.min' => 'El nombre minimamente debe tener mas de 5 caracteres', | ||
'nombre_especialidad.max' => 'El nombre no debe superar los 40 caracteres', | ||
'nombre_especialidad.unique' => 'El nombre debe ser unico', | ||
|
||
'descripcion_especialidad.required' => 'Es neceserio que este campo este llenado', | ||
'descripcion_especialidad.min' => 'La dirrecion minimamente debe tener mas de 5 caracteres', | ||
'descripcion_especialidad.max' => 'La dirrecion no debe superar los 40caracteres', | ||
|
||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\Http\Requests; | ||
|
||
use Illuminate\Foundation\Http\FormRequest; | ||
|
||
class StoreEspecialidadRequest extends FormRequest | ||
{ | ||
|
||
public function authorize() | ||
{ | ||
return true; | ||
} | ||
// {$this->post->id} | ||
|
||
|
||
public function rules() | ||
{ | ||
return [ | ||
'nombre_especialidad' => 'required|string|min:5|max:40|unique:especialidades,nombre_especialidad', | ||
'descripcion_especialidad' => 'required|string|min:5|max:40', | ||
|
||
]; | ||
} | ||
public function messages() | ||
{ | ||
return [ | ||
'nombre_especialidad.required' => 'Es neceserio que este campo este llenado', | ||
'nombre_especialidad.min' => 'El nombre minimamente debe tener mas de 5 caracteres', | ||
'nombre_especialidad.max' => 'El nombre no debe superar los 40 caracteres', | ||
'nombre_especialidad.unique' => 'El nombre debe ser unico', | ||
|
||
'descripcion_especialidad.required' => 'Es neceserio que este campo este llenado', | ||
'descripcion_especialidad.min' => 'La dirrecion minimamente debe tener mas de 5 caracteres', | ||
'descripcion_especialidad.max' => 'La dirrecion no debe superar los 40caracteres', | ||
|
||
]; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
<x-layouts.app> | ||
<div class="card"> | ||
<div class="card-header">Datos de la Sede</div> | ||
<div class="card-body"> | ||
<div class="card"> | ||
<div class="card-header">Datos de la especialidad</div> | ||
<div class="card-body"> | ||
|
||
<div class="card-body"> | ||
<h5 class="card-title">Nombre de la Sede : {{ $Sede->nombre_sede }}</h5> | ||
<p class="card-text">Dirreccion de la sede : {{ $Sede->direccion_sede }}</p> | ||
<p class="card-text">Telefono de la sede : {{ $Sede->telefono_sede }}</p> | ||
<p class="card-text">Ciudad de la Sede: {{ $Sede->ciudad_sede }}</p> | ||
</div> | ||
<div class="card-body"> | ||
<h5 class="card-title">Datos de la especialidad</h5> | ||
<p class="card-text">Nombre de la especialidad: {{ $Especialidad->nombre_especialidad }}</p> | ||
<p class="card-text">Descripcion de la especialidad : {{ $Especialidad->descripcion_especialidad }}</p> | ||
|
||
</div> | ||
|
||
</hr> | ||
</hr> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</x-layouts.app> | ||
</x-layouts.app> |