Compare commits
No commits in common. "ec4f167dcf2aa54ae852ca6d03b42e13a9b84cc5" and "4796d87d81ceafdc85366c0d0778c7d49fd72927" have entirely different histories.
ec4f167dcf
...
4796d87d81
|
|
@ -1,39 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Foundation\Auth\ConfirmsPasswords;
|
|
||||||
|
|
||||||
class ConfirmPasswordController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Confirm Password Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller is responsible for handling password confirmations and
|
|
||||||
| uses a simple trait to include the behavior. You're free to explore
|
|
||||||
| this trait and override any functions that require customization.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use ConfirmsPasswords;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Where to redirect users when the intended url fails.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $redirectTo = '/home';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('auth');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
|
||||||
|
|
||||||
class ForgotPasswordController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Password Reset Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller is responsible for handling password reset emails and
|
|
||||||
| includes a trait which assists in sending these notifications from
|
|
||||||
| your application to your users. Feel free to explore this trait.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use SendsPasswordResetEmails;
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
|
||||||
|
|
||||||
class LoginController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Login Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller handles authenticating users for the application and
|
|
||||||
| redirecting them to your home screen. The controller uses a trait
|
|
||||||
| to conveniently provide its functionality to your applications.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use AuthenticatesUsers;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Where to redirect users after login.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $redirectTo = '/home';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('guest')->except('logout');
|
|
||||||
$this->middleware('auth')->only('logout');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Foundation\Auth\RegistersUsers;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
use Illuminate\Support\Facades\Validator;
|
|
||||||
|
|
||||||
class RegisterController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Register Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller handles the registration of new users as well as their
|
|
||||||
| validation and creation. By default this controller uses a trait to
|
|
||||||
| provide this functionality without requiring any additional code.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use RegistersUsers;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Where to redirect users after registration.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $redirectTo = '/home';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('guest');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a validator for an incoming registration request.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Contracts\Validation\Validator
|
|
||||||
*/
|
|
||||||
protected function validator(array $data)
|
|
||||||
{
|
|
||||||
return Validator::make($data, [
|
|
||||||
'name' => ['required', 'string', 'max:255'],
|
|
||||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
|
||||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new user instance after a valid registration.
|
|
||||||
*
|
|
||||||
* @return User
|
|
||||||
*/
|
|
||||||
protected function create(array $data)
|
|
||||||
{
|
|
||||||
return User::create([
|
|
||||||
'name' => $data['name'],
|
|
||||||
'email' => $data['email'],
|
|
||||||
'password' => Hash::make($data['password']),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
|
||||||
|
|
||||||
class ResetPasswordController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Password Reset Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller is responsible for handling password reset requests
|
|
||||||
| and uses a simple trait to include this behavior. You're free to
|
|
||||||
| explore this trait and override any methods you wish to tweak.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use ResetsPasswords;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Where to redirect users after resetting their password.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $redirectTo = '/home';
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\Auth;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Foundation\Auth\VerifiesEmails;
|
|
||||||
|
|
||||||
class VerificationController extends Controller
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Email Verification Controller
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This controller is responsible for handling email verification for any
|
|
||||||
| user that recently registered with the application. Emails may also
|
|
||||||
| be re-sent if the user didn't receive the original email message.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
use VerifiesEmails;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Where to redirect users after verification.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $redirectTo = '/home';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('auth');
|
|
||||||
$this->middleware('signed')->only('verify');
|
|
||||||
$this->middleware('throttle:6,1')->only('verify', 'resend');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class HomeController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create a new controller instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('auth');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the application dashboard.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Contracts\Support\Renderable
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return view('home');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -5,15 +5,16 @@ namespace App\Http\Controllers;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use App\Models\Persona;
|
use App\Models\Persona;
|
||||||
use App\Http\Requests\UpdatedPersonaRequest;
|
|
||||||
|
|
||||||
class PersonaController extends Controller
|
class PersonaController extends Controller
|
||||||
{
|
{
|
||||||
public function index(Request $request){
|
public function index(Request $request)
|
||||||
|
{
|
||||||
|
$persona = Persona::withTrashed()-> get();
|
||||||
|
|
||||||
$persona = Persona::withTrashed()->get();
|
return view('personas.index',["personas"=>$persona]);
|
||||||
|
|
||||||
// $categorias = Categorias::findOrFail(13);
|
// $categorias = Categorias::findOrFail(13);
|
||||||
//$cat = Categorias::where('id_categoria', 1)->first();
|
//$cat = Categorias::where('id_categoria', 1)->first();
|
||||||
//$categorias = Categorias::where('descripcion', 'Cursos, capacitaciones y formación')->get();
|
//$categorias = Categorias::where('descripcion', 'Cursos, capacitaciones y formación')->get();
|
||||||
//$categorias = Categorias::where('descripcion', 'like', '%Prod%')->get();
|
//$categorias = Categorias::where('descripcion', 'like', '%Prod%')->get();
|
||||||
|
|
@ -23,9 +24,6 @@ class PersonaController extends Controller
|
||||||
//$categorias = Categorias::first();
|
//$categorias = Categorias::first();
|
||||||
//$categorias = Categorias::last();
|
//$categorias = Categorias::last();
|
||||||
/*Categorias::count();*/
|
/*Categorias::count();*/
|
||||||
|
|
||||||
|
|
||||||
return view('personas.index', ["persona"=>$persona]);
|
|
||||||
}
|
}
|
||||||
public function show($id){
|
public function show($id){
|
||||||
$persona = Persona::findOrfail($id);
|
$persona = Persona::findOrfail($id);
|
||||||
|
|
@ -35,7 +33,6 @@ class PersonaController extends Controller
|
||||||
public function destroy(Request $request, $id){
|
public function destroy(Request $request, $id){
|
||||||
$persona = Persona::findOrfail($id);
|
$persona = Persona::findOrfail($id);
|
||||||
$persona->delete();
|
$persona->delete();
|
||||||
$request->session()->flash('mensaje-success', 'La persona fue eliminada.');
|
|
||||||
return redirect('/personas');
|
return redirect('/personas');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,35 +43,13 @@ class PersonaController extends Controller
|
||||||
|
|
||||||
public function store(Request $request){
|
public function store(Request $request){
|
||||||
|
|
||||||
$request->validate([
|
|
||||||
'apellido' => 'required|regex:/^[a-zA-ZáéíóúñÁÉÍÓÚ]+( [a-zA-ZáéíóúñÁÉÍÓÚ]+)*$/|max:20|unique:persona,apellido',
|
|
||||||
'nombre' => 'required|regex:/^[a-zA-ZáéíóúñÁÉÍÓÚ]+( [a-zA-ZáéíóúñÁÉÍÓÚ]+)*$/|max:20|unique:persona,nombre',
|
|
||||||
'dni' => 'required|numeric|digits_between:7,8',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'apellido.required' => 'el campo apellido es requerido',
|
|
||||||
'apellido.regex' => 'el campo apellido solo debe contener letras',
|
|
||||||
'apellido.max' => 'el campo apellido debe contener un maximo de 20 caracteres',
|
|
||||||
'apellido.unique' => 'ya existe este apellido',
|
|
||||||
'nombre.required' => 'el campo nombre es requerido',
|
|
||||||
'nombre.regex' => 'el campo nombre solo debe contener letras',
|
|
||||||
'nombre.max' => 'el campo nombre debe contener un maximo de 20 caracteres',
|
|
||||||
'nombre.unique' => 'ya existe este nombre',
|
|
||||||
'dni' => 'el campo dni es requerido',
|
|
||||||
'dni' => 'el campo dni debe contener solo numeros',
|
|
||||||
'dni' => 'el campo dni debe contener un maximo de 8 caracteres',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
$persona = new Persona();
|
$persona = new Persona();
|
||||||
$persona->fill([
|
$persona->fill([
|
||||||
'apellido'=> $request->input('apellido'),
|
'apellido' => $request->input('apellido'),
|
||||||
'nombre' => $request->input('nombre'),
|
'nombre' => $request->input('nombre'),
|
||||||
'dni' => $request->input('dni'),
|
'dni' => $request->input('dni'),
|
||||||
]);
|
]);
|
||||||
$persona->save();
|
$persona->save();
|
||||||
$request->session()->flash('mensaje-success', 'La persona fue agregada.');
|
|
||||||
return redirect('/personas');
|
return redirect('/personas');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,21 +62,48 @@ class PersonaController extends Controller
|
||||||
public function update(Request $request, $id){
|
public function update(Request $request, $id){
|
||||||
$persona = Persona::findOrfail($id);
|
$persona = Persona::findOrfail($id);
|
||||||
$persona->fill([
|
$persona->fill([
|
||||||
'apellido'=> $request->input('apellido'),
|
'apellido' => $request->input('apellido'),
|
||||||
'nombre' => $request->input('nombre'),
|
'nombre' => $request->input('nombre'),
|
||||||
'dni' => $request->input('dni'),
|
'dni' => $request->input('dni'),
|
||||||
]);
|
]);
|
||||||
$persona->update();
|
$persona->update();
|
||||||
$request->session()->flash('mensaje-success', 'La persona fue modificada.');
|
|
||||||
return redirect('/personas');
|
return redirect('/personas');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function restaurar(Request $request, $id){
|
public function restaurar(Request $request, $id){
|
||||||
$persona = Persona::withTrashed()->findOrfail($id);
|
$persona = Persona::withTrashed()->findOrfail($id);
|
||||||
$persona->restore();
|
$persona->restore();
|
||||||
$request->session()->flash('mensaje-success', 'La persona fue restaurada.');
|
|
||||||
return redirect('/personas');
|
return redirect('/personas');
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function show($id){
|
||||||
|
$categorias = Categorias::findOrfail($id);
|
||||||
|
|
||||||
|
return view('categorias.show', ["cat"=>$categorias]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function edit($id){
|
||||||
|
$categorias = Categorias::findOrfail($id);
|
||||||
|
return view('categorias.edit', ["cat"=>$categorias]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update(Request $request, $id){
|
||||||
|
$categorias = Categorias::findOrfail($id);
|
||||||
|
$categorias->fill([
|
||||||
|
'nombre' => $request->input('nombre'),
|
||||||
|
'descripcion' => $request->input('descripcion'),
|
||||||
|
]);
|
||||||
|
$categorias->update();
|
||||||
|
return redirect('/categorias');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
|
|
||||||
class UpdatedPersonaRequest extends FormRequest
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*/
|
|
||||||
public function authorize(): bool
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
|
||||||
*/
|
|
||||||
public function rules(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'apellido' => 'required|regex:/^[a-zA-ZáéíóúñÁÉÍÓÚ]+( [a-zA-ZáéíóúñÁÉÍÓÚ]+)*$/|max:20|unique:persona,apellido,' . $this->route('persona') . ',id_persona',
|
|
||||||
'nombre' => 'required|regex:/^[a-zA-ZáéíóúñÁÉÍÓÚ]+( [a-zA-ZáéíóúñÁÉÍÓÚ]+)*$/|max:20|unique:persona,nombre,' . $this->route('persona') . ',id_persona',
|
|
||||||
'dni' => 'required'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function messages() {
|
|
||||||
|
|
||||||
return [
|
|
||||||
'apellido.required' => 'el campo apellido es requerido',
|
|
||||||
'apellido.regex' => 'el campo apellido solo debe contener letras',
|
|
||||||
'apellido.max' => 'el campo apellido debe contener un maximo de 20 caracteres',
|
|
||||||
'apellido.unique' => 'ya existe este apellido',
|
|
||||||
'nombre.required' => 'el campo nombre es requerido',
|
|
||||||
'nombre.regex' => 'el campo nombre solo debe contener letras',
|
|
||||||
'nombre.max' => 'el campo nombre debe contener un maximo de 20 caracteres',
|
|
||||||
'nombre.unique' => 'ya existe este nombre',
|
|
||||||
'dni' => 'el campo dni es requerido'
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -21,6 +19,6 @@ class AppServiceProvider extends ServiceProvider
|
||||||
*/
|
*/
|
||||||
public function boot(): void
|
public function boot(): void
|
||||||
{
|
{
|
||||||
Schema::defaultStringLength(191);
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,7 @@
|
||||||
"guzzlehttp/guzzle": "^7.2",
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
"laravel/framework": "^10.10",
|
"laravel/framework": "^10.10",
|
||||||
"laravel/sanctum": "^3.3",
|
"laravel/sanctum": "^3.3",
|
||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8"
|
||||||
"laravel/ui": "^4.6"
|
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.9.1",
|
||||||
|
|
|
||||||
65
composer.lock
generated
65
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "dcbbd52cf3c38d0f1b88e12d39e47db7",
|
"content-hash": "9c491b8531eec05ba41a11d9276a5749",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
|
@ -1512,69 +1512,6 @@
|
||||||
},
|
},
|
||||||
"time": "2026-02-06T14:12:35+00:00"
|
"time": "2026-02-06T14:12:35+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "laravel/ui",
|
|
||||||
"version": "v4.6.3",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/laravel/ui.git",
|
|
||||||
"reference": "ff27db15416c1ed8ad9848f5692e47595dd5de27"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/laravel/ui/zipball/ff27db15416c1ed8ad9848f5692e47595dd5de27",
|
|
||||||
"reference": "ff27db15416c1ed8ad9848f5692e47595dd5de27",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"illuminate/console": "^9.21|^10.0|^11.0|^12.0|^13.0",
|
|
||||||
"illuminate/filesystem": "^9.21|^10.0|^11.0|^12.0|^13.0",
|
|
||||||
"illuminate/support": "^9.21|^10.0|^11.0|^12.0|^13.0",
|
|
||||||
"illuminate/validation": "^9.21|^10.0|^11.0|^12.0|^13.0",
|
|
||||||
"php": "^8.0",
|
|
||||||
"symfony/console": "^6.0|^7.0|^8.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"orchestra/testbench": "^7.35|^8.15|^9.0|^10.0|^11.0",
|
|
||||||
"phpunit/phpunit": "^9.3|^10.4|^11.5|^12.5|^13.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"Laravel\\Ui\\UiServiceProvider"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"branch-alias": {
|
|
||||||
"dev-master": "4.x-dev"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Laravel\\Ui\\": "src/",
|
|
||||||
"Illuminate\\Foundation\\Auth\\": "auth-backend/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Taylor Otwell",
|
|
||||||
"email": "taylor@laravel.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Laravel UI utilities and presets.",
|
|
||||||
"keywords": [
|
|
||||||
"laravel",
|
|
||||||
"ui"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"source": "https://github.com/laravel/ui/tree/v4.6.3"
|
|
||||||
},
|
|
||||||
"time": "2026-03-17T13:41:52+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "2.8.2",
|
"version": "2.8.2",
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('password_resets', function (Blueprint $table) {
|
|
||||||
$table->string('email')->index();
|
|
||||||
$table->string('token');
|
|
||||||
$table->timestamp('created_at')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('password_resets');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
@ -6,11 +6,8 @@
|
||||||
"build": "vite build"
|
"build": "vite build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@popperjs/core": "^2.11.6",
|
|
||||||
"axios": "^1.6.4",
|
"axios": "^1.6.4",
|
||||||
"bootstrap": "^5.2.3",
|
|
||||||
"laravel-vite-plugin": "^1.0.0",
|
"laravel-vite-plugin": "^1.0.0",
|
||||||
"sass": "^1.56.1",
|
|
||||||
"vite": "^5.0.0"
|
"vite": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
resources/js/bootstrap.js
vendored
4
resources/js/bootstrap.js
vendored
|
|
@ -1,5 +1,3 @@
|
||||||
import 'bootstrap';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We'll load the axios HTTP library which allows us to easily issue requests
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||||
* to our Laravel back-end. This library automatically handles sending the
|
* to our Laravel back-end. This library automatically handles sending the
|
||||||
|
|
@ -26,7 +24,7 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
// broadcaster: 'pusher',
|
// broadcaster: 'pusher',
|
||||||
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||||
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
||||||
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
// wsHost: import.meta.env.VITE_PUSHER_HOST ? import.meta.env.VITE_PUSHER_HOST : `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
||||||
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||||
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||||
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
// Body
|
|
||||||
$body-bg: #f8fafc;
|
|
||||||
|
|
||||||
// Typography
|
|
||||||
$font-family-sans-serif: 'Nunito', sans-serif;
|
|
||||||
$font-size-base: 0.9rem;
|
|
||||||
$line-height-base: 1.6;
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
// Fonts
|
|
||||||
@import url('https://fonts.bunny.net/css?family=Nunito');
|
|
||||||
|
|
||||||
// Variables
|
|
||||||
@import 'variables';
|
|
||||||
|
|
||||||
// Bootstrap
|
|
||||||
@import 'bootstrap/scss/bootstrap';
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Login') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="POST" action="{{ route('login') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
|
||||||
|
|
||||||
@error('email')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
|
||||||
|
|
||||||
@error('password')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
|
|
||||||
|
|
||||||
<label class="form-check-label" for="remember">
|
|
||||||
{{ __('Remember Me') }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-8 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Login') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
@if (Route::has('password.request'))
|
|
||||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
|
||||||
{{ __('Forgot Your Password?') }}
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Confirm Password') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
{{ __('Please confirm your password before continuing.') }}
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('password.confirm') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
|
|
||||||
|
|
||||||
@error('password')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-8 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Confirm Password') }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
@if (Route::has('password.request'))
|
|
||||||
<a class="btn btn-link" href="{{ route('password.request') }}">
|
|
||||||
{{ __('Forgot Your Password?') }}
|
|
||||||
</a>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
@if (session('status'))
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ session('status') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('password.email') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
|
||||||
|
|
||||||
@error('email')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Send Password Reset Link') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="POST" action="{{ route('password.update') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<input type="hidden" name="token" value="{{ $token }}">
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
|
|
||||||
|
|
||||||
@error('email')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
|
||||||
|
|
||||||
@error('password')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Reset Password') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Register') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
<form method="POST" action="{{ route('register') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="name" class="col-md-4 col-form-label text-md-end">{{ __('Name') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') }}" required autocomplete="name" autofocus>
|
|
||||||
|
|
||||||
@error('name')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
|
|
||||||
|
|
||||||
@error('email')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
|
||||||
|
|
||||||
@error('password')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Register') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Verify Your Email Address') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
@if (session('resent'))
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ __('A fresh verification link has been sent to your email address.') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{{ __('Before proceeding, please check your email for a verification link.') }}
|
|
||||||
{{ __('If you did not receive the email') }},
|
|
||||||
<form class="d-inline" method="POST" action="{{ route('verification.resend') }}">
|
|
||||||
@csrf
|
|
||||||
<button type="submit" class="btn btn-link p-0 m-0 align-baseline">{{ __('click here to request another') }}</button>.
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
@if ($errors->any())
|
|
||||||
<div class="alert alert-danger">
|
|
||||||
<ul>
|
|
||||||
@foreach ($errors->all() as $error)
|
|
||||||
<li>{{ $error }}</li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
@if (session('mensaje-success'))
|
|
||||||
<p class="alert alert-success">{{ session('mensaje-success') }}</p>
|
|
||||||
@endif
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
@if (session('status'))
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ session('status') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{{ __('You are logged in!') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="es">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<!-- viewport => hace que el sitio sea responsive en móviles -->
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<!-- Token CSRF de Laravel para proteger formularios -->
|
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
<!-- yield => permite que cada vista defina su título; si no lo define, se usa "MiApp" -->
|
|
||||||
<title>@yield('title','proyecto_taller')</title>
|
|
||||||
|
|
||||||
<!-- Bootstrap CSS v4.6.2:
|
|
||||||
- framework que da estilos listos para botones, formularios, grillas, etc. -->
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
|
|
||||||
|
|
||||||
<!-- FontAwesome:
|
|
||||||
- librería de íconos (ej: fa-eye, fa-pencil, fa-remove, etc.). -->
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
||||||
<!-- DataTables: -->
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.8/css/dataTables.bootstrap4.min.css">
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.2/css/buttons.bootstrap4.min.css">
|
|
||||||
<!-- @stack('styles') => permite que otras vistas agreguen CSS extra en esta sección -->
|
|
||||||
@stack('styles')
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<!-- navbar => barra de navegación de Bootstrap -->
|
|
||||||
<!-- navbar-expand-lg => se expande en pantallas grandes (LG) -->
|
|
||||||
<!-- navbar-light => estilo de texto oscuro sobre fondo claro -->
|
|
||||||
<!-- bg-light => fondo gris claro -->
|
|
||||||
|
|
||||||
<nav class="navbar navbar-expand-lg bg-light">
|
|
||||||
|
|
||||||
<!-- Nombre de la aplicación -->
|
|
||||||
<a class="navbar-brand" href="{{ url('/') }}">
|
|
||||||
proyecto_taller
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- Menú principal -->
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
|
|
||||||
<!-- Categorías -->
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
|
|
||||||
<a class="nav-link dropdown-toggle"
|
|
||||||
href="#"
|
|
||||||
data-toggle="dropdown">
|
|
||||||
|
|
||||||
PERSONAS
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="dropdown-menu">
|
|
||||||
|
|
||||||
<a class="dropdown-item"
|
|
||||||
href="{{ route('personas.index') }}">
|
|
||||||
|
|
||||||
Listado
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a class="dropdown-item"
|
|
||||||
href="{{ route('personas.create') }}">
|
|
||||||
|
|
||||||
Nueva Persona
|
|
||||||
</a>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
</nav>
|
|
||||||
<!-- container => centra el contenido y le da márgenes automáticos laterales -->
|
|
||||||
<!-- py-4 => padding vertical (arriba y abajo) de 1.5rem (~24px) -->
|
|
||||||
<div class="container py-4">
|
|
||||||
<!-- yield('contenido') => espacio donde cada vista Blade inyecta su propio contenido -->
|
|
||||||
@yield('contenido')
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Dependencias JS -->
|
|
||||||
<!-- jQuery => requerido por Bootstrap 4 -->
|
|
||||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
|
||||||
<!-- Popper.js => requerido para tooltips, dropdowns y menús flotantes -->
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
|
|
||||||
<!-- Bootstrap JS => activa componentes interactivos como modales, menús, tooltips -->
|
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"></script>
|
|
||||||
|
|
||||||
<!-- DataTables -->
|
|
||||||
<script src="https://cdn.datatables.net/1.13.8/js/jquery.dataTables.min.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/1.13.8/js/dataTables.bootstrap4.min.js"></script>
|
|
||||||
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.4.2/js/dataTables.buttons.min.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.bootstrap4.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
|
||||||
<script src="https://cdn.datatables.net/buttons/2.4.2/js/buttons.html5.min.js"></script>
|
|
||||||
|
|
||||||
<!-- stack('scripts') => permite que otras vistas agreguen scripts extra -->
|
|
||||||
@stack('scripts')
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
<!doctype html>
|
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<!-- CSRF Token -->
|
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
|
|
||||||
<title>{{ config('app.name', 'Laravel') }}</title>
|
|
||||||
|
|
||||||
<!-- Fonts -->
|
|
||||||
<link rel="dns-prefetch" href="//fonts.bunny.net">
|
|
||||||
<link href="https://fonts.bunny.net/css?family=Nunito" rel="stylesheet">
|
|
||||||
|
|
||||||
<!-- Bootstrap y FontAwesome por CDN-->
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
|
|
||||||
|
|
||||||
<!-- Scripts -->
|
|
||||||
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app">
|
|
||||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
|
|
||||||
<div class="container">
|
|
||||||
<a class="navbar-brand" href="{{ url('/') }}">
|
|
||||||
{{ config('app.name', 'Laravel') }}
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
||||||
<!-- Left Side Of Navbar -->
|
|
||||||
<ul class="navbar-nav me-auto">
|
|
||||||
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<!-- Right Side Of Navbar -->
|
|
||||||
<ul class="navbar-nav ms-auto">
|
|
||||||
<!-- Authentication Links -->
|
|
||||||
@guest
|
|
||||||
@if (Route::has('login'))
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if (Route::has('register'))
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
@else
|
|
||||||
<li class="nav-item dropdown">
|
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
|
||||||
{{ Auth::user()->name }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
|
||||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
|
||||||
onclick="event.preventDefault();
|
|
||||||
document.getElementById('logout-form').submit();">
|
|
||||||
{{ __('Logout') }}
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
|
||||||
@csrf
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
@endguest
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<main class="py-4">
|
|
||||||
@yield('content')
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,80 +1,42 @@
|
||||||
@extends('layouts.admin')
|
<!doctype html>
|
||||||
@section('contenido')
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Editar persona</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
<!-- row => fila del sistema de grillas de Bootstrap
|
<h1>Editar persona</h1>
|
||||||
justify-content-center => centra horizontalmente el contenido dentro de la fila
|
|
||||||
align-items-center => alinea verticalmente los elementos de la fila -->
|
|
||||||
<div class="row justify-content-center align-items-center">
|
|
||||||
<!-- col-lg-11 col-md-11 col-sm-11 col-xs-11 =>
|
|
||||||
la columna ocupa 11/12 partes en todos los tamaños de pantalla -->
|
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11 col-xs-11">
|
|
||||||
<h3>Editar Persona</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-10">
|
|
||||||
|
|
||||||
<!-- Includes de Blade para mensajes de éxito y errores -->
|
<form method="POST" action="{{ route('personas.update', $per->id_persona) }}">
|
||||||
@include('compartido.mensajes')
|
|
||||||
@include('compartido.errores')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<!-- Formulario de edición de categoría -->
|
|
||||||
<form method="POST"
|
|
||||||
action="{{ route('personas.update', $per->id_persona) }}"
|
|
||||||
enctype="multipart/form-data">
|
|
||||||
@csrf
|
@csrf
|
||||||
@method('PUT') <!-- Indica a Laravel que el método real es PUT -->
|
@method('PUT')
|
||||||
|
|
||||||
<!-- row => agrupa los campos en una fila -->
|
<div>
|
||||||
<div class="row">
|
<label for="apellido">Apellido *</label><br>
|
||||||
<!-- form-group => añade márgenes y separación entre los campos -->
|
<input id="apellido" name="apellido" type="text"
|
||||||
<!-- col-md-3 => cada campo ocupa 3/12 columnas en pantallas medianas o más grandes -->
|
value="{{ old('apellido', $per->apellido) }}" required>
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<!-- form-check-label => estilo Bootstrap para etiquetas de formulario -->
|
|
||||||
<label for="apellido" class="form-check-label">Apellido (*)</label>
|
|
||||||
<!-- form-control => da estilo uniforme al input -->
|
|
||||||
<input type="text" name="apellido" id="apellido" class="form-control"
|
|
||||||
value="{{ old('apellido', $per->apellido) }}" >
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="nombre" class="form-check-label">Nombre (*)</label>
|
|
||||||
<input type="text" name="nombre" id="nombre" class="form-control"
|
|
||||||
value="{{ old('nombre', $per->nombre) }}" >
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="dni" class="form-check-label">DNI (*)</label>
|
|
||||||
<input type="number" name="dni" id="dni" class="form-control"
|
|
||||||
value="{{ old('dni', $per->dni) }}" >
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- row justify-content-center align-items-center =>
|
|
||||||
fila que centra horizontal y verticalmente los botones -->
|
<div>
|
||||||
<div class="row justify-content-center align-items-center">
|
<label for="nombre">Nombre *</label><br>
|
||||||
<div class="col-md-2">
|
<input id="nombre" name="nombre" type="text"
|
||||||
<!-- btn => clase base de Bootstrap para botones
|
value="{{ old('nombre', $per->nombre) }}" required>
|
||||||
btn-success => verde (acción positiva)
|
</div>
|
||||||
btn-block => ocupa todo el ancho de la columna
|
|
||||||
btn-lg => tamaño grande -->
|
<div style="margin-top:8px;">
|
||||||
<button class="btn btn-success btn-block btn-lg">Guardar</button>
|
<label for="dni">DNI</label><br>
|
||||||
</div>
|
<input id="dni" name="dni" type="text"
|
||||||
<div class="col-md-2">
|
value="{{ old('dni', $per->dni) }}">
|
||||||
<!-- btn-primary => azul (acción principal)
|
</div>
|
||||||
title="Salir" => tooltip al pasar el mouse -->
|
|
||||||
<a href="{{ route('personas.index') }}" class="btn btn-primary btn-block btn-lg" title="Salir">Salir</a>
|
<div style="margin-top:12px;">
|
||||||
</div>
|
<button type="submit">Guardar</button>
|
||||||
|
<a href="{{ route('personas.index') }}">Volver al listado</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@endsection
|
</body>
|
||||||
|
</html>
|
||||||
@push('scripts')
|
|
||||||
<script>
|
|
||||||
//Aquí se pueden agregar scripts específicos de esta vista -->
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
|
|
@ -1,130 +1,51 @@
|
||||||
@extends('layouts.admin')
|
<!doctype html>
|
||||||
@section('contenido')
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<title>Personas</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>
|
||||||
|
<a href="{{ route('personas.create') }}">Nueva persona</a>
|
||||||
|
</p>
|
||||||
|
<ul>
|
||||||
|
@foreach($personas as $per)
|
||||||
|
<li>
|
||||||
|
<strong>{{ $per->apellido }}</strong>
|
||||||
|
— {{ $per->nombre }}
|
||||||
|
— {{ $per->dni }}
|
||||||
|
(ID: {{ $per->id_persona}})
|
||||||
|
|
|
||||||
|
|
||||||
<!-- row => fila del sistema de grillas Bootstrap
|
@if($per->trashed())
|
||||||
justify-content-center => centra horizontalmente los contenidos
|
|
||||||
align-items-center => centra verticalmente
|
|
||||||
no centran el texto, centran las columnas dentro de la fila
|
|
||||||
-->
|
|
||||||
|
|
||||||
<div class="row justify-content-center align-items-center">
|
<form action="{{ route('personas.restaurar', $per->id_persona) }}"
|
||||||
<!-- col-12 => ocupa todo el ancho en pantallas pequeñas
|
method="POST" >
|
||||||
col-md-11 => ocupa 11/12 del ancho en pantallas medianas o mayores -->
|
@csrf
|
||||||
<div class="col-12 col-md-11">
|
@method('PUT')
|
||||||
<h3>Listado de Personas</h3>
|
<button onclick="return confirm('¿Restaurar esta persona?')">
|
||||||
</div>
|
Restaurar persona
|
||||||
</div>
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
<div class="row justify-content-center align-items-center">
|
@else
|
||||||
<div class="col-md-2">
|
<a href="{{ route('personas.show', $per->id_persona) }}">Ver Más</a>
|
||||||
<!-- btn => estilo de botón Bootstrap
|
|
|
||||||
btn-success => verde (acción positiva)
|
<a href="{{ route('personas.edit', $per->id_persona) }}">Editar </a>
|
||||||
btn-block => ocupa todo el ancho de la columna
|
<form action="{{ route('personas.destroy', $per->id_persona) }}"
|
||||||
btn-lg => tamaño grande -->
|
method="POST" >
|
||||||
<a href="{{ route('personas.create') }}"
|
@csrf
|
||||||
class="btn btn-success btn-block btn-lg"
|
@method('DELETE')
|
||||||
title="Nueva Persona">
|
<button onclick="return confirm('¿Eliminar esta persona?')">
|
||||||
Nuevo
|
Eliminar
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
{{--<a href="{{ route('personas.edit', $per->id_personas) }}">Editar</a>
|
||||||
|
--}}
|
||||||
|
@endif
|
||||||
|
</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
|
||||||
<div class="row justify-content-center align-items-center">
|
</body>
|
||||||
<div class="col-12 col-md-11">
|
</html>
|
||||||
|
|
||||||
<!-- Includes de Blade para mensajes de éxito y errores -->
|
|
||||||
@include('compartido.mensajes')
|
|
||||||
@include('compartido.errores')
|
|
||||||
|
|
||||||
<!-- table-responsive => hace que la tabla sea "scrollable" en pantallas pequeñas -->
|
|
||||||
<div class="table-responsive">
|
|
||||||
|
|
||||||
<!-- table => tabla con estilos básicos
|
|
||||||
table-striped => filas alternadas con fondo gris
|
|
||||||
table-bordered => agrega bordes a todas las celdas
|
|
||||||
table-hover => resalta la fila al pasar el mouse -->
|
|
||||||
<table class="table table-striped table-bordered table-hover" id="example">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Id</th>
|
|
||||||
<th>Apellido</th>
|
|
||||||
<th>Nombre</th>
|
|
||||||
<th>DNI</th>
|
|
||||||
<th>Acciones</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach($persona as $per)
|
|
||||||
<tr>
|
|
||||||
<td>{{ $per->id_persona }}</td>
|
|
||||||
<td>{{ $per->apellido }}</td>
|
|
||||||
<td>{{ $per->nombre }}</td>
|
|
||||||
<td>{{ $per->dni }}</td>
|
|
||||||
<td align="center">
|
|
||||||
|
|
||||||
@if($per->deleted_at == null)
|
|
||||||
<form method="POST" action="{{ route('personas.destroy', $per->id_persona) }}" style="display:inline;">
|
|
||||||
@csrf
|
|
||||||
@method('DELETE')
|
|
||||||
|
|
||||||
<!-- btn-info => azul claro (información) -->
|
|
||||||
<a class="btn btn-info"
|
|
||||||
href="{{ route('personas.show', $per->id_persona) }}"
|
|
||||||
title="Ver más">
|
|
||||||
<i class="fa fa-eye"></i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- btn-warning => amarillo (advertencia / editar) -->
|
|
||||||
<a class="btn btn-warning"
|
|
||||||
href="{{ route('personas.edit', $per->id_persona) }}"
|
|
||||||
title="Editar">
|
|
||||||
<i class="fa fa-pencil"></i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<!-- btn-danger => rojo (acción destructiva como eliminar) -->
|
|
||||||
<button class="btn btn-danger"
|
|
||||||
onclick="return confirm('¿Está seguro de eliminar?');"
|
|
||||||
title="Eliminar">
|
|
||||||
<i class="fa fa-remove"></i>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
@else
|
|
||||||
<form method="POST" action="{{ route('personas.restaurar', $per->id_persona) }}" style="display:inline;">
|
|
||||||
@csrf
|
|
||||||
@method('PUT')
|
|
||||||
|
|
||||||
<!-- btn-danger => rojo (acción destructiva como eliminar) -->
|
|
||||||
<button class="btn btn-success"
|
|
||||||
onclick="return confirm('¿Está seguro de Restaurar a esta persona?');"
|
|
||||||
title="Restaurar">
|
|
||||||
<i class="fa fa-undo"></i>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
@push('styles')
|
|
||||||
|
|
||||||
@endpush
|
|
||||||
@push('scripts')
|
|
||||||
<script>
|
|
||||||
// DataTables (plugin JS para mejorar tablas: búsqueda, paginación, exportación)
|
|
||||||
$('#example').DataTable({
|
|
||||||
dom: 'Bfrtip',
|
|
||||||
buttons: ['excel'],
|
|
||||||
pageLength: 5,
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
|
|
|
||||||
|
|
@ -1,75 +1,37 @@
|
||||||
@extends('layouts.admin')
|
<!doctype html>
|
||||||
@section ('contenido')
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Nueva persona</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
<!-- row => fila del sistema de grillas de Bootstrap
|
<h1>Nueva persona</h1>
|
||||||
justify-content-center => centra horizontalmente el contenido dentro de la fila
|
|
||||||
align-items-center => centra verticalmente los elementos dentro de la fila -->
|
|
||||||
<div class="row justify-content-center align-items-center">
|
|
||||||
<!-- col-lg-11 col-md-11 col-sm-11 col-xs-11 =>
|
|
||||||
la columna ocupa 11/12 partes del ancho en todos los tamaños de pantalla -->
|
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11 col-xs-11">
|
|
||||||
<h3>Nueva Persona</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-10">
|
|
||||||
|
|
||||||
<!-- Includes de Blade para mensajes de éxito y errores -->
|
<form method="POST" action="{{ route('personas.store') }}">
|
||||||
@include('compartido.mensajes')
|
@csrf
|
||||||
@include('compartido.errores')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</br>
|
|
||||||
|
|
||||||
<!-- Formulario para crear nueva categoría -->
|
<div>
|
||||||
<form method="post" action="{{ route('personas.store') }}" enctype=multipart/form-data>
|
<label for="apellido">Apellido *</label><br>
|
||||||
@csrf
|
<input id="apellido" name="apellido" type="text" value="{{ old('apellido') }}" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- row => agrupa los campos en una fila -->
|
<div>
|
||||||
<div class="row">
|
<label for="nombre">Nombre *</label><br>
|
||||||
<!-- form-group => separa cada campo del formulario con márgenes
|
<input id="nombre" name="nombre" type="text" value="{{ old('nombre') }}" required>
|
||||||
col-md-3 => ocupa 3/12 columnas en pantallas medianas hacia arriba -->
|
</div>
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<!-- form-check-label => clase de Bootstrap que estiliza etiquetas de formulario -->
|
|
||||||
<label for="apellido" class="form-check-label">Apellido (*)</label>
|
|
||||||
<!-- form-control => aplica estilos consistentes al input-->
|
|
||||||
<input type="text" name="apellido" id="apellido" value="{{old('apellido')}}" required class="form-control" >
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div style="margin-top:8px;">
|
||||||
<label for="nombre" class="form-check-label">Nombre (*)</label>
|
<label for="dni">DNI</label><br>
|
||||||
<input type="text" name="nombre" id="nombre" value="{{old('nombre')}}" class="form-control">
|
<input id="dni" name="dni" type="text" value="{{ old('dni') }}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<div style="margin-top:12px;">
|
||||||
<label for="dni" class="form-check-label">DNI (*)</label>
|
<button type="submit">Guardar</button>
|
||||||
<input type="number" name="dni" id="dni" value="{{old('dni')}}" class="form-control">
|
<a href="{{ route('personas.index') }}">Volver al listado</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- row justify-content-center align-items-center =>
|
|
||||||
crea una fila y centra horizontal y verticalmente los botones -->
|
|
||||||
<div class="row justify-content-center align-items-center">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<!-- btn => botón base de Bootstrap
|
|
||||||
btn-success => color verde
|
|
||||||
btn-block => ocupa todo el ancho de la columna
|
|
||||||
btn-lg => tamaño grande -->
|
|
||||||
<button class="btn btn-success btn-block btn-lg">Guardar</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<!-- btn-primary => color azul
|
|
||||||
title="Salir" => muestra tooltip al pasar el mouse -->
|
|
||||||
<a href="{{ route('personas.index') }}" class="btn btn-primary btn-block btn-lg" title="Salir">Salir</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@endsection
|
</body>
|
||||||
|
</html>
|
||||||
@push('scripts')
|
|
||||||
<script>
|
|
||||||
//Aquí podrías agregar código JavaScript específico para esta vista
|
|
||||||
</script>
|
|
||||||
@endpush
|
|
||||||
|
|
@ -1,34 +1,37 @@
|
||||||
@extends('layouts.admin')
|
<!doctype html>
|
||||||
@section ('contenido')
|
<html lang="es">
|
||||||
<div class="row justify-content-center align-items-center">
|
<head>
|
||||||
<div class="col-lg-11 col-md-11 col-sm-11 col-xs-11">
|
<meta charset="utf-8">
|
||||||
<h3>Ver Persona</h3>
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<div class="progress" style="height: 2px;"></div>
|
<title>Ver persona</title>
|
||||||
</div>
|
</head>
|
||||||
</div>
|
<body>
|
||||||
</br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="apellido" class="form-check-label">Apellido (*)</label>
|
|
||||||
<input type="text" name="apellido" id="apellido" class="form-control" value="{{$per->apellido}}" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
<h1>Ver persona</h1>
|
||||||
<label for="nombre" class="form-check-label">Nombre (*)</label>
|
|
||||||
<input type="text" name="nombre" id="nombre" class="form-control" value="{{$per->nombre}}" readonly>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group col-md-3">
|
|
||||||
<label for="dni" class="form-check-label">DNI (*)</label>
|
|
||||||
<input type="text" name="dni" id="dni" class="form-control" value="{{$per->dni}}" readonly>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<legend></legend>
|
|
||||||
<div class="row justify-content-center align-items-center">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<a href="{{ route('personas.index') }}" class="btn btn-primary btn-block btn-lg" title="Salir">Salir</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endsection
|
<div>
|
||||||
|
<label for="apellido">Apellido *</label><br>
|
||||||
|
<input id="apellido" name="apellido" readonly type="text"
|
||||||
|
value="{{ $per->apellido }}" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="nombre">Nombre *</label><br>
|
||||||
|
<input id="nombre" name="nombre" readonly type="text"
|
||||||
|
value="{{ $per->nombre }}" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top:8px;">
|
||||||
|
<label for="dni">DNI</label><br>
|
||||||
|
<input id="dni" readonly name="dni" type="text"
|
||||||
|
value="{{ $per->dni }}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="margin-top:12px;">
|
||||||
|
<a href="{{ route('personas.index') }}">Volver al listado</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,3 @@ Route::put('personas/{persona}', [PersonaController::class, 'update'])->name('pe
|
||||||
|
|
||||||
Route::resource('personas', PersonaController::class);
|
Route::resource('personas', PersonaController::class);
|
||||||
Route::put('personas/restaurar/{persona}', [PersonaController::class, 'restaurar'])->name('personas.restaurar');
|
Route::put('personas/restaurar/{persona}', [PersonaController::class, 'restaurar'])->name('personas.restaurar');
|
||||||
Auth::routes();
|
|
||||||
|
|
||||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@ import laravel from 'laravel-vite-plugin';
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
laravel({
|
laravel({
|
||||||
input: [
|
input: ['resources/css/app.css', 'resources/js/app.js'],
|
||||||
'resources/sass/app.scss',
|
|
||||||
'resources/js/app.js',
|
|
||||||
],
|
|
||||||
refresh: true,
|
refresh: true,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user