Browse Source

empresas: se agrego el nuevo catalogo

Israel
iht 1 year ago
parent
commit
3ac14baa38
  1. BIN
      .DS_Store
  2. 18
      .editorconfig
  3. 58
      .env.example
  4. 11
      .gitattributes
  5. 0
      .gitignore
  6. 0
      LICENSE
  7. 0
      README.md
  8. 27
      app/Console/Kernel.php
  9. 48
      app/Exceptions/Handler.php
  10. 162
      app/Http/Controllers/Administracion/DepartamentosController.php
  11. 161
      app/Http/Controllers/Administracion/EmpresasController.php
  12. 111
      app/Http/Controllers/Administracion/GruposTrabajoController.php
  13. 162
      app/Http/Controllers/Administracion/UsuariosController.php
  14. 40
      app/Http/Controllers/Auth/ConfirmPasswordController.php
  15. 65
      app/Http/Controllers/Auth/ExpirarContrasenaController.php
  16. 22
      app/Http/Controllers/Auth/ForgotPasswordController.php
  17. 242
      app/Http/Controllers/Auth/LoginController.php
  18. 73
      app/Http/Controllers/Auth/RegisterController.php
  19. 30
      app/Http/Controllers/Auth/ResetPasswordController.php
  20. 42
      app/Http/Controllers/Auth/VerificationController.php
  21. 75
      app/Http/Controllers/Bitacora/BitacoraController.php
  22. 47
      app/Http/Controllers/Bitacora/CargarPdfsController.php
  23. 12
      app/Http/Controllers/Controller.php
  24. 28
      app/Http/Controllers/HomeController.php
  25. 47
      app/Http/Controllers/InicioController.php
  26. 70
      app/Http/Controllers/RecursosHumanos/ArchivosNominasController.php
  27. 47
      app/Http/Controllers/RecursosHumanos/CargarPdfsController.php
  28. 68
      app/Http/Kernel.php
  29. 17
      app/Http/Middleware/Authenticate.php
  30. 17
      app/Http/Middleware/EncryptCookies.php
  31. 17
      app/Http/Middleware/PreventRequestsDuringMaintenance.php
  32. 30
      app/Http/Middleware/RedirectIfAuthenticated.php
  33. 31
      app/Http/Middleware/Roles.php
  34. 19
      app/Http/Middleware/TrimStrings.php
  35. 20
      app/Http/Middleware/TrustHosts.php
  36. 28
      app/Http/Middleware/TrustProxies.php
  37. 22
      app/Http/Middleware/ValidateSignature.php
  38. 17
      app/Http/Middleware/VerifyCsrfToken.php
  39. 33
      app/Models/ArchivosNominas.php
  40. 27
      app/Models/Empleados.php
  41. 24
      app/Models/Empresas.php
  42. 25
      app/Models/ExpirarContrasena.php
  43. 30
      app/Models/Grupos.php
  44. 24
      app/Models/Roles.php
  45. 60
      app/Models/User.php
  46. 24
      app/Providers/AppServiceProvider.php
  47. 26
      app/Providers/AuthServiceProvider.php
  48. 19
      app/Providers/BroadcastServiceProvider.php
  49. 38
      app/Providers/EventServiceProvider.php
  50. 94
      app/Providers/RouteServiceProvider.php
  51. 53
      artisan
  52. 55
      bootstrap/app.php
  53. 2
      bootstrap/cache/.gitignore
  54. 69
      composer.json
  55. 8413
      composer.lock
  56. 215
      config/app.php
  57. 115
      config/auth.php
  58. 70
      config/broadcasting.php
  59. 110
      config/cache.php
  60. 34
      config/cors.php
  61. 151
      config/database.php
  62. 76
      config/filesystems.php
  63. 52
      config/hashing.php
  64. 123
      config/logging.php
  65. 124
      config/mail.php
  66. 93
      config/queue.php
  67. 67
      config/sanctum.php
  68. 34
      config/services.php
  69. 201
      config/session.php
  70. 36
      config/view.php
  71. 1
      database/.gitignore
  72. 38
      database/factories/UserFactory.php
  73. 36
      database/migrations/2014_10_12_000000_create_users_table.php
  74. 28
      database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php
  75. 32
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  76. 32
      database/migrations/2019_08_19_000000_create_failed_jobs_table.php
  77. 33
      database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php
  78. 34
      database/migrations/2022_06_27_174447_create_grupos_table.php
  79. 30
      database/migrations/2023_03_10_181544_create_empleados_table.php
  80. 35
      database/migrations/2023_03_10_182842_create_archivos_nominas_table.php
  81. 28
      database/migrations/2023_03_14_182315_create_roles_table.php
  82. 29
      database/migrations/2023_03_19_060818_create_expirar_contrasena_table.php
  83. 28
      database/migrations/2023_07_21_031511_create_empresas_table.php
  84. 29
      database/seeders/DatabaseSeeder.php
  85. 20
      database/seeders/EmpresasSeeder.php
  86. 23
      database/seeders/RolesTableSeeder.php
  87. 30
      database/seeders/UsersTableSeeder.php
  88. BIN
      nominasrh-master.zip
  89. 1840
      package-lock.json
  90. 17
      package.json
  91. 31
      phpunit.xml
  92. 21
      public/.htaccess
  93. BIN
      public/RE4101Q2023-3-205330-17A.pdf
  94. 205
      public/assets/extra-libs/block-ui/block-ui.js
  95. 1
      public/assets/extra-libs/c3/c3.min.css
  96. 9963
      public/assets/extra-libs/c3/c3.min.js
  97. 10885
      public/assets/extra-libs/c3/d3.min.js
  98. 66
      public/assets/extra-libs/calendar/calendar.css
  99. 1006
      public/assets/extra-libs/css-chart/css-chart.css
  100. 31
      public/assets/extra-libs/custom-switch/bootstrap4-toggle.min.css
  101. Some files were not shown because too many files have changed in this diff Show More

BIN
.DS_Store vendored

Binary file not shown.

18
.editorconfig

@ -0,0 +1,18 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4

58
.env.example

@ -0,0 +1,58 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="hello@example.com"
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

11
.gitattributes vendored

@ -0,0 +1,11 @@
* text=auto eol=lf
*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php
/.github export-ignore
CHANGELOG.md export-ignore
.styleci.yml export-ignore

0
.gitignore vendored

27
app/Console/Kernel.php

@ -0,0 +1,27 @@
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}

48
app/Exceptions/Handler.php

@ -0,0 +1,48 @@
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of exception types with their corresponding custom log levels.
*
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
*/
protected $levels = [
//
];
/**
* A list of the exception types that are not reported.
*
* @var array<int, class-string<\Throwable>>
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register the exception handling callbacks for the application.
*/
public function register(): void
{
$this->reportable(function (Throwable $e) {
//
});
}
}

162
app/Http/Controllers/Administracion/DepartamentosController.php

@ -0,0 +1,162 @@
<?php
namespace App\Http\Controllers\Administracion;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use App\Models\Empleados;
use App\Models\ExpirarContrasena;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class DepartamentosController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$empleados = Empleados::all();
return view('administracion/departamentos',[ 'empleados' => $empleados ]);
}
public function nuevoUsuario( Request $request ){
$datosUsuario = $request->usuario;
$datosEmpleado = $request->empleado;
$datosUsuario['password'] = bcrypt('123456');
$nuevoUsuario = User::create( $datosUsuario );
$datosEmpleado['fk_id_users'] = $nuevoUsuario->id;
Empleados::create( $datosEmpleado );
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
return 'Exito papuus';
}
public function editarUsuario( Request $request ){
$datosEmpleado = $request->empleado;
User::where('id',$request->usuario['id'])->update($request->usuario );
$datosEmpleado['fk_id_users'] = $request->usuario['id'];
Empleados::updateOrCreate( $datosEmpleado ) ;
return 'Exito papuus';
}
public function eliminarUsuario( Request $request ){
User::where('id',$request->id)->update([
'activo' => 0,
'eliminado' => 1
]);
return 'Exito';
}
public function cargarListasUsuarios(Request $request){
$fileContpaq = $this->convertirExcelArray($request->file('files'));
$this->generarUsuarios( $fileContpaq, $request) ;
return 'exito!!!';
}
public function convertirExcelArray($file){
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setReadDataOnly(true);
$excel = $reader->load($file);
$sheet = $excel->getSheet(0);
$sheetData = $sheet->toArray(null, false, true, true);
return $sheetData;
}
public function generarUsuarios($file, $request )
{
foreach ($file as $row => $val){
if( $row > 1 ){
if( !is_null($val['A']) && !is_null($val['B']) ){
$nuevoUsuario = User::create([
'name' => $val['B'],
'fk_id_roles' => 3,
'fk_id_grupos' => 0,
'email' => $val['B'],
'password' => bcrypt('123456'),
]);
Empleados::create([
'clave_contpaq' => $val['A'],
'nombre_completo' => $val['B'],
'fk_id_users' => $nuevoUsuario->id
]);
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
}
}
}
return 'Exito';
}
public function expirarContrasena( Request $request ){
ExpirarContrasena::where('fk_id_users',$request->id)->update(['dias_expiracion' => 0]);
User::where('id',$request->id)->update(['password' => bcrypt('123456')]);
}
}

161
app/Http/Controllers/Administracion/EmpresasController.php

@ -0,0 +1,161 @@
<?php
namespace App\Http\Controllers\Administracion;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use App\Models\Empleados;
use App\Models\ExpirarContrasena;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class EmpresasController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
return view('administracion/empresas');
}
public function nuevoUsuario( Request $request ){
$datosUsuario = $request->usuario;
$datosEmpleado = $request->empleado;
$datosUsuario['password'] = bcrypt('123456');
$nuevoUsuario = User::create( $datosUsuario );
$datosEmpleado['fk_id_users'] = $nuevoUsuario->id;
Empleados::create( $datosEmpleado );
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
return 'Exito papuus';
}
public function editarUsuario( Request $request ){
$datosEmpleado = $request->empleado;
User::where('id',$request->usuario['id'])->update($request->usuario );
$datosEmpleado['fk_id_users'] = $request->usuario['id'];
Empleados::updateOrCreate( $datosEmpleado ) ;
return 'Exito papuus';
}
public function eliminarUsuario( Request $request ){
User::where('id',$request->id)->update([
'activo' => 0,
'eliminado' => 1
]);
return 'Exito';
}
public function cargarListasUsuarios(Request $request){
$fileContpaq = $this->convertirExcelArray($request->file('files'));
$this->generarUsuarios( $fileContpaq, $request) ;
return 'exito!!!';
}
public function convertirExcelArray($file){
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setReadDataOnly(true);
$excel = $reader->load($file);
$sheet = $excel->getSheet(0);
$sheetData = $sheet->toArray(null, false, true, true);
return $sheetData;
}
public function generarUsuarios($file, $request )
{
foreach ($file as $row => $val){
if( $row > 1 ){
if( !is_null($val['A']) && !is_null($val['B']) ){
$nuevoUsuario = User::create([
'name' => $val['B'],
'fk_id_roles' => 3,
'fk_id_grupos' => 0,
'email' => $val['B'],
'password' => bcrypt('123456'),
]);
Empleados::create([
'clave_contpaq' => $val['A'],
'nombre_completo' => $val['B'],
'fk_id_users' => $nuevoUsuario->id
]);
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
}
}
}
return 'Exito';
}
public function expirarContrasena( Request $request ){
ExpirarContrasena::where('fk_id_users',$request->id)->update(['dias_expiracion' => 0]);
User::where('id',$request->id)->update(['password' => bcrypt('123456')]);
}
}

111
app/Http/Controllers/Administracion/GruposTrabajoController.php

@ -0,0 +1,111 @@
<?php
namespace App\Http\Controllers\Administracion;
use App\Models\User;
use App\Models\Grupos;
use App\Models\UsersGrupos;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
class GruposTrabajoController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
return view('grupos/grupos',['users'=>User::select('id','name')->where('activo',1)->where('eliminado',0)->get()]);
}
function nuevo_grupo(Request $request){
Grupos::create($request->grupos);
return "Exito";
}
function agregar_users_grupo(Request $request){
$grupo= collect($request->all())->except('_token','fk_id_users');
$usuariosActual = User::where('fk_id_grupos',$grupo)->pluck('id')->toArray();
$usuariosNuevo= collect($request->all())->except('_token','fk_id_grupos')->toArray();
$nuevosintegrantes = array_diff($usuariosNuevo['fk_id_users'] , $usuariosActual);
$sacarintegrantes = array_diff( $usuariosActual,$usuariosNuevo['fk_id_users'] );
//INSERTAR USUARIOS AL GRUPO Y ACTUALIZA USUARIO
if(!empty($nuevosintegrantes)){
foreach($nuevosintegrantes as $dato ){
UsersGrupos::create(['fk_id_users' => $dato,
'fk_id_grupos'=>$grupo['fk_id_grupos'],
'activo'=>1]);
User::where('id',$dato )->update([
'fk_id_grupos' => $grupo['fk_id_grupos']]);
}
}
//SACA USUARIOS DEL GRUPO Y ACTUALIZA USUARIO A 0
if(!empty($sacarintegrantes)){
echo("sacar Integrantes");
foreach($sacarintegrantes as $dato ){
UsersGrupos::where('fk_id_users',$dato )->update([
'activo'=>0,
'eliminado'=>1]);
User::where('id',$dato )->update([
'fk_id_grupos' => 0 ]);
}
}
return "Exito";
}
public function eliminar_grupo(Request $request){
Grupos::where('id',$request->id )->update([
'activo'=>0,
'eliminado'=>1]);
User::where('fk_id_grupos',$request->id)->update([
'fk_id_grupos' => 0 ]);
}
public function vaciar_users_grupo(Request $request){
User::where('fk_id_grupos',$request->fk_id_grupos)->update([
'fk_id_grupos' => 0 ]);
}
}

162
app/Http/Controllers/Administracion/UsuariosController.php

@ -0,0 +1,162 @@
<?php
namespace App\Http\Controllers\Administracion;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use App\Models\Empleados;
use App\Models\ExpirarContrasena;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class UsuariosController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$empleados = Empleados::all();
return view('administracion/usuarios',[ 'empleados' => $empleados ]);
}
public function nuevoUsuario( Request $request ){
$datosUsuario = $request->usuario;
$datosEmpleado = $request->empleado;
$datosUsuario['password'] = bcrypt('123456');
$nuevoUsuario = User::create( $datosUsuario );
$datosEmpleado['fk_id_users'] = $nuevoUsuario->id;
Empleados::create( $datosEmpleado );
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
return 'Exito papuus';
}
public function editarUsuario( Request $request ){
$datosEmpleado = $request->empleado;
User::where('id',$request->usuario['id'])->update($request->usuario );
$datosEmpleado['fk_id_users'] = $request->usuario['id'];
Empleados::updateOrCreate( $datosEmpleado ) ;
return 'Exito papuus';
}
public function eliminarUsuario( Request $request ){
User::where('id',$request->id)->update([
'activo' => 0,
'eliminado' => 1
]);
return 'Exito';
}
public function cargarListasUsuarios(Request $request){
$fileContpaq = $this->convertirExcelArray($request->file('files'));
$this->generarUsuarios( $fileContpaq, $request) ;
return 'exito!!!';
}
public function convertirExcelArray($file){
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$reader->setReadDataOnly(true);
$excel = $reader->load($file);
$sheet = $excel->getSheet(0);
$sheetData = $sheet->toArray(null, false, true, true);
return $sheetData;
}
public function generarUsuarios($file, $request )
{
foreach ($file as $row => $val){
if( $row > 1 ){
if( !is_null($val['A']) && !is_null($val['B']) ){
$nuevoUsuario = User::create([
'name' => $val['B'],
'fk_id_roles' => 3,
'fk_id_grupos' => 0,
'email' => $val['B'],
'password' => bcrypt('123456'),
]);
Empleados::create([
'clave_contpaq' => $val['A'],
'nombre_completo' => $val['B'],
'fk_id_users' => $nuevoUsuario->id
]);
ExpirarContrasena::create([
'fk_id_users' => $nuevoUsuario->id,
'dias_expiracion' => 0,
'ultima_actualizacion' => Carbon::now()
]);
}
}
}
return 'Exito';
}
public function expirarContrasena( Request $request ){
ExpirarContrasena::where('fk_id_users',$request->id)->update(['dias_expiracion' => 0]);
User::where('id',$request->id)->update(['password' => bcrypt('123456')]);
}
}

40
app/Http/Controllers/Auth/ConfirmPasswordController.php

@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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 = RouteServiceProvider::HOME;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
}

65
app/Http/Controllers/Auth/ExpirarContrasenaController.php

@ -0,0 +1,65 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Models\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use App\Models\ExpirarContrasena;
use DB;
class ExpirarContrasenaController extends Controller
{
public function showPasswordExpirationForm(Request $request){
//dd/trewq 0($request->password_expired_id);
$password_expired_id = $request->password_expired_id;
if(!isset($password_expired_id)){
return redirect('/login');
}
return view('auth.passwordExpiration', ['password_expired_id' => $password_expired_id]);
}
public function postPasswordExpiration(Request $request){
$password_expired_id = $request->password_expired_id;
if(!isset($password_expired_id)){
return redirect('/login');
}
$user = User::find($password_expired_id);
if (!(Hash::check($request->get('current-password'), $user->password))) {
// The passwords matches
return redirect()->back()->with('message', ['type'=> 'error', 'text' => 'Su contraseña actual no coincide, favor de intentarlo de nuevo.', 'title' => '¡Error!']);
}
if(strcmp($request->get('current-password'), $request->get('new-password')) == 0){
//Current password and new password are same
return redirect()->back()->with('message', ['type'=> 'error', 'text' => 'Su nueva contraseña no debe ser igual a su contraseña actual, favor de intentarlo de nuevo.', 'title' => '¡Error!']);
}
if(strcmp($request->get('repeat-password'), $request->get('new-password')) != 0){
//Current password and new password are same
return redirect()->back()->with('message', ['type'=> 'error', 'text' => 'Favor de repetir la contraseña correctamente, intentalo de nuevo.', 'title' => '¡Error!']);
}
// $validatedData = $request->validate([
// 'current-password' => 'required',
// 'new-password' => 'required|string|min:6',
// 'repeat-password' => 'required|string|min:6',
// ]);
// dd($validatedData);
//Change Password
$user->password = Hash::make($request->get('new-password'));
$user->save();
//Update password updation timestamp
ExpirarContrasena::where('fk_id_users',$user->id)->update([
'ultima_actualizacion' => now(),
'dias_expiracion' =>365
]);
return redirect('/')->with('message', ['type'=> 'success', 'text' => 'Su contraseña ah sido actualizada correctamente.', 'title' => '¡Éxito!']);
}
}

22
app/Http/Controllers/Auth/ForgotPasswordController.php

@ -0,0 +1,22 @@
<?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;
}

242
app/Http/Controllers/Auth/LoginController.php

@ -0,0 +1,242 @@
<?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\JsonResponse;
use App\Http\Controllers\Controller;
use App\Models\ExpirarContrasena;
use App\Providers\RouteServiceProvider;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Foundation\Auth\RedirectsUsers;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use App\Models\ExpirarContrasenas;
use Illuminate\Support\Facades\Redirect;
class LoginController extends Controller
{
use RedirectsUsers, ThrottlesLogins;
protected $redirectTo = '/inicio';
/**
* Show the application's login form.
*
* @return \Illuminate\View\View
*/
public function showLoginForm()
{
return view('auth.login');
}
/**
* Handle a login request to the application.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\Response|\Illuminate\Http\JsonResponse
*
* @throws \Illuminate\Validation\ValidationException
*/
public function login(Request $request)
{
$this->validateLogin($request);
// If the class is using the ThrottlesLogins trait, we can automatically throttle
// the login attempts for this application. We'll key this by the username and
// the IP address of the client making these requests into this application.
if (method_exists($this, 'hasTooManyLoginAttempts') &&
$this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
return $this->sendLockoutResponse($request);
}
if ($this->attemptLogin($request)) {
if ($request->hasSession()) {
$request->session()->put('auth.password_confirmed_at', time());
}
return $this->sendLoginResponse($request);
}
// If the login attempt was unsuccessful we will increment the number of attempts
// to login and redirect the user back to the login form. Of course, when this
// user surpasses their maximum number of attempts they will get locked out.
$this->incrementLoginAttempts($request);
return $this->sendFailedLoginResponse($request);
}
/**
* Validate the user login request.
*
* @param \Illuminate\Http\Request $request
* @return void
*
* @throws \Illuminate\Validation\ValidationException
*/
protected function validateLogin(Request $request)
{
$request->validate([
$this->username() => 'required|string',
'password' => 'required|string',
]);
}
/**
* Attempt to log the user into the application.
*
* @param \Illuminate\Http\Request $request
* @return bool
*/
protected function attemptLogin(Request $request)
{
return $this->guard()->attempt(
$this->credentials($request), $request->boolean('remember')
);
}
/**
* Get the needed authorization credentials from the request.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
protected function credentials(Request $request)
{
return $request->only($this->username(), 'password');
}
/**
* Send the response after the user was authenticated.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
*/
protected function sendLoginResponse(Request $request)
{
$request->session()->regenerate();
$this->clearLoginAttempts($request);
if ($response = $this->authenticated($request, $this->guard()->user())) {
return $response;
}
return $request->wantsJson()
? new JsonResponse([], 204)
: redirect()->intended($this->redirectPath());
}
/**
* The user has been authenticated.
*
* @param \Illuminate\Http\Request $request
* @param mixed $user
* @return mixed
*/
protected function authenticated(Request $request, $user)
{
if($user->activo != 1){
return redirect()->route('login')->with('message', ['type'=> 'error', 'text' => 'Tu acceso ha sido desactivado o eliminado.', 'title' => '¡Error!']);
// abort(401);
}else{
$expirar = ExpirarContrasena::where('fk_id_users',$user->id)->get()->toArray();
// dd($expirar);
if($expirar){
$dias = Carbon::parse($expirar[0]['ultima_actualizacion'])->addDays($expirar[0]['dias_expiracion']);
//prueba
// if($dias->lessThan(Carbon::now())){
// auth()->logout();
// return redirect()->route('contrasena_expirada', ['password_expired_id' => $user->id])->with('message', ['type'=> 'error', 'text' => 'Tu contraseña ah expirado, favor de actualizar su contraseña..', 'title' => '¡Error!']);
// }
if($expirar[0]['dias_expiracion'] == 0){
auth()->logout();
return redirect()->route('contrasena_expirada', ['password_expired_id' => $user->id])->with('message', ['type'=> 'error', 'text' => 'Tu contraseña ah expirado, favor de actualizar su contraseña..', 'title' => '¡Error!']);
}
}
return redirect()->intended($this->redirectPath());
return false;
}
}
/**
* Get the failed login response instance.
*
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Illuminate\Validation\ValidationException
*/
protected function sendFailedLoginResponse(Request $request)
{
throw ValidationException::withMessages([
// $this->username() => [trans('auth.failed')],
$this->username() => ['No se encontraron coincidencias con el usuario y la contraseña.'],
]);
}
/**
* Get the login username to be used by the controller.
*
* @return string
*/
public function username()
{
return 'name';
}
/**
* Log the user out of the application.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
*/
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->invalidate();
$request->session()->regenerateToken();
if ($response = $this->loggedOut($request)) {
return $response;
}
return $request->wantsJson()
? new JsonResponse([], 204)
: redirect('/');
}
/**
* The user has logged out of the application.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function loggedOut(Request $request)
{
//
}
/**
* Get the guard to be used during authentication.
*
* @return \Illuminate\Contracts\Auth\StatefulGuard
*/
protected function guard()
{
return Auth::guard();
}
}

73
app/Http/Controllers/Auth/RegisterController.php

@ -0,0 +1,73 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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 = RouteServiceProvider::HOME;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @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.
*
* @param array $data
* @return \App\Models\User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => Hash::make($data['password']),
]);
}
}

30
app/Http/Controllers/Auth/ResetPasswordController.php

@ -0,0 +1,30 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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 = RouteServiceProvider::HOME;
}

42
app/Http/Controllers/Auth/VerificationController.php

@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
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 = RouteServiceProvider::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');
}
}

75
app/Http/Controllers/Bitacora/BitacoraController.php

@ -0,0 +1,75 @@
<?php
namespace App\Http\Controllers\Bitacora;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Throwable;
class BitacoraController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
return view('bitacora/bitacora');
}
public function cargarArchivos( Request $request ){
$fk_id_users = Auth::user()->id;
$mensjes = [];
foreach( $request->file('files') as $archivo ){
$nombreArchivo = $archivo->getClientOriginalName();
$datosNombreArchivo = explode('_',$nombreArchivo);
// dd($datosNombreArchivo);
Storage::disk('public')->put( $nombreArchivo , \File::get( $archivo ));
try{
ArchivosNominas::updateOrCreate([
'nombre_archivo' => $nombreArchivo
],
['fk_id_users_alta' => $fk_id_users,
'tipo_nomina' => $datosNombreArchivo[2],
'ano_fiscal' => $datosNombreArchivo[3],
'numero_nomina' => $datosNombreArchivo[4],
'clave_contpaq' => $datosNombreArchivo[5]]
);
$mensjes[] = [
'archivo' => $nombreArchivo,
'estado' => 'Exito',
];
}catch(Throwable $e){
$mensjes[] = [
'archivo' => $nombreArchivo,
'estado' => $e->getMessage()
];
}
}
return $mensjes;
}
}

47
app/Http/Controllers/Bitacora/CargarPdfsController.php

@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers\RecursosHumanos;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class CargarPdfsController extends Controller
{
public function index()
{
return view('recursos_humanos/cargar_pdfs');
}
public function cargarArchivos( Request $request ){
$fk_id_users = Auth::user()->id;
foreach( $request->file('files') as $archivo ){
$nombreArchivo = $archivo->getClientOriginalName();
$claveEmpleado = explode('_',$nombreArchivo);
Storage::disk('public')->put( $nombreArchivo , \File::get( $archivo ));
ArchivosNominas::updateOrCreate([
'nombre_archivo' => $nombreArchivo
],
['fk_id_users' => $fk_id_users,
'clave_empleado' => $claveEmpleado[5]]
);
}
return 'exito!!!';
}
}

12
app/Http/Controllers/Controller.php

@ -0,0 +1,12 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController
{
use AuthorizesRequests, ValidatesRequests;
}

28
app/Http/Controllers/HomeController.php

@ -0,0 +1,28 @@
<?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');
}
}

47
app/Http/Controllers/InicioController.php

@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class InicioController 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()
{
$idUsuario = Auth::user()->id;
$archivosEmpleado = User::with(['datosEmpleado.archivosNominas' => function($q){
return $q->where('archivos_nominas.activo',1)->where('archivos_nominas.eliminado',0)->orderBy('numero_nomina','DESC')->take(3)->get();
}])->where('id',$idUsuario)->first();
// dd( $archivosEmpleado );
$usuarioEmpleaodo = User::with(['datosEmpleado.archivosNominas' => function($q){
return $q->where('archivos_nominas.activo',1)->where('archivos_nominas.eliminado',0)->orderBy('numero_nomina','DESC')->first();
}])->where('id',$idUsuario)->first();
return view('inicio',[
'nombreEmpleado' => $usuarioEmpleaodo['datosEmpleado']?->nombre_completo,
'nombreArchivo' => isset($usuarioEmpleaodo['datosEmpleado']['archivosNominas'][0]) ? $usuarioEmpleaodo['datosEmpleado']['archivosNominas'][0]->nombre_archivo : 'No contiene archivos',
'fechaArchivo' => isset($usuarioEmpleaodo['datosEmpleado']['archivosNominas'][0]) ? $usuarioEmpleaodo['datosEmpleado']['archivosNominas'][0]->fecha_registro : 'Aun no tiene fecha de actualizacion',
'archivosEmpleado' => isset($archivosEmpleado) ? $archivosEmpleado : 'Aun no tiene fecha de actualizacion'
]);
}
}

70
app/Http/Controllers/RecursosHumanos/ArchivosNominasController.php

@ -0,0 +1,70 @@
<?php
namespace App\Http\Controllers\RecursosHumanos;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
use Throwable;
class ArchivosNominasController extends Controller
{
public function index()
{
return view('recursos_humanos/archivos_nominas');
}
public function cargarArchivos( Request $request ){
$fk_id_users = Auth::user()->id;
$mensjes = [];
foreach( $request->file('files') as $archivo ){
$nombreArchivo = $archivo->getClientOriginalName();
$datosNombreArchivo = explode('_',$nombreArchivo);
// dd($datosNombreArchivo);
Storage::disk('public')->put( $nombreArchivo , \File::get( $archivo ));
try{
ArchivosNominas::updateOrCreate([
'nombre_archivo' => $nombreArchivo
],
['fk_id_users_alta' => $fk_id_users,
'tipo_nomina' => $datosNombreArchivo[2],
'ano_fiscal' => $datosNombreArchivo[3],
'numero_nomina' => $datosNombreArchivo[4],
'clave_contpaq' => $datosNombreArchivo[5]]
);
$mensjes[] = [
'archivo' => $nombreArchivo,
'estado' => 'Exito',
];
}catch(Throwable $e){
$mensjes[] = [
'archivo' => $nombreArchivo,
'estado' => $e->getMessage()
];
}
}
return $mensjes;
}
}

47
app/Http/Controllers/RecursosHumanos/CargarPdfsController.php

@ -0,0 +1,47 @@
<?php
namespace App\Http\Controllers\RecursosHumanos;
use App\Http\Controllers\Controller;
use App\Models\ArchivosNominas;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;
class CargarPdfsController extends Controller
{
public function index()
{
return view('recursos_humanos/cargar_pdfs');
}
public function cargarArchivos( Request $request ){
$fk_id_users = Auth::user()->id;
foreach( $request->file('files') as $archivo ){
$nombreArchivo = $archivo->getClientOriginalName();
$claveEmpleado = explode('_',$nombreArchivo);
Storage::disk('public')->put( $nombreArchivo , \File::get( $archivo ));
ArchivosNominas::updateOrCreate([
'nombre_archivo' => $nombreArchivo
],
['fk_id_users' => $fk_id_users,
'clave_empleado' => $claveEmpleado[5]]
);
}
return 'exito!!!';
}
}

68
app/Http/Kernel.php

@ -0,0 +1,68 @@
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array<int, class-string|string>
*/
protected $middleware = [
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Illuminate\Http\Middleware\HandleCors::class,
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
\App\Http\Middleware\TrimStrings::class,
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
];
/**
* The application's route middleware groups.
*
* @var array<string, array<int, class-string|string>>
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];
/**
* The application's middleware aliases.
*
* Aliases may be used to conveniently assign middleware to routes and groups.
*
* @var array<string, class-string|string>
*/
protected $middlewareAliases = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \App\Http\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
'roles' => \App\Http\Middleware\Roles::class,
];
}

17
app/Http/Middleware/Authenticate.php

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;
class Authenticate extends Middleware
{
/**
* Get the path the user should be redirected to when they are not authenticated.
*/
protected function redirectTo(Request $request): ?string
{
return $request->expectsJson() ? null : route('login');
}
}

17
app/Http/Middleware/EncryptCookies.php

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

17
app/Http/Middleware/PreventRequestsDuringMaintenance.php

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
class PreventRequestsDuringMaintenance extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

30
app/Http/Middleware/RedirectIfAuthenticated.php

@ -0,0 +1,30 @@
<?php
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\HttpFoundation\Response;
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next, string ...$guards): Response
{
$guards = empty($guards) ? [null] : $guards;
foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteServiceProvider::HOME);
}
}
return $next($request);
}
}

31
app/Http/Middleware/Roles.php

@ -0,0 +1,31 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Symfony\Component\HttpFoundation\Response;
class Roles
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next ,$roles): Response
{
$listaRoles = explode('|',$roles);
$user = Auth::user();
foreach($listaRoles as $rol){
if( $user->hasRole($user->id)['rol'] == $rol ){
return $next($request);
}
}
return redirect('inicio');
}
}

19
app/Http/Middleware/TrimStrings.php

@ -0,0 +1,19 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array<int, string>
*/
protected $except = [
'current_password',
'password',
'password_confirmation',
];
}

20
app/Http/Middleware/TrustHosts.php

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array<int, string|null>
*/
public function hosts(): array
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

28
app/Http/Middleware/TrustProxies.php

@ -0,0 +1,28 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}

22
app/Http/Middleware/ValidateSignature.php

@ -0,0 +1,22 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Routing\Middleware\ValidateSignature as Middleware;
class ValidateSignature extends Middleware
{
/**
* The names of the query string parameters that should be ignored.
*
* @var array<int, string>
*/
protected $except = [
// 'fbclid',
// 'utm_campaign',
// 'utm_content',
// 'utm_medium',
// 'utm_source',
// 'utm_term',
];
}

17
app/Http/Middleware/VerifyCsrfToken.php

@ -0,0 +1,17 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array<int, string>
*/
protected $except = [
//
];
}

33
app/Models/ArchivosNominas.php

@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ArchivosNominas extends Model
{
protected $connection = 'mysql';
protected $table = 'archivos_nominas';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'fk_id_users_alta',
'nombre_archivo',
'tipo_nomina',
'ano_fiscal',
'numero_nomina',
'clave_contpaq',
'activo',
'eliminado',
'fecha_registro'
];
public function empleado(){
return $this->hasOne(Empleados::class,'clave_contpaq','clave_contpaq');
}
}

27
app/Models/Empleados.php

@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Empleados extends Model
{
protected $connection = 'mysql';
protected $table = 'empleados';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'clave_contpaq',
'nombre_completo',
'fk_id_users',
];
public function archivosNominas(){
return $this->hasMany(ArchivosNominas::class,'clave_contpaq','clave_contpaq');
}
}

24
app/Models/Empresas.php

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Empresas extends Model
{
protected $connection = 'mysql';
protected $table = 'empresas';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'empresa',
'activo'
];
}

25
app/Models/ExpirarContrasena.php

@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ExpirarContrasena extends Model
{
protected $connection = 'mysql';
protected $table = 'expirar_contrasena';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'fk_id_users',
'dias_expiracion',
'ultima_actualizacion'
];
}

30
app/Models/Grupos.php

@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Grupos extends Model
{
protected $primaryKey = 'id';
protected $table = 'grupos';
protected $fillable = [
'name',
'activo',
'eliminado',
'created_at',
'updated_at'
];
public function usuarios()
{
return $this->hasMany(User::class,'fk_id_grupos','id');
}
}

24
app/Models/Roles.php

@ -0,0 +1,24 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Roles extends Model
{
protected $connection = 'mysql';
protected $table = 'roles';
protected $primaryKey = 'id';
public $timestamps = false;
protected $fillable = [
'rol',
'activo'
];
}

60
app/Models/User.php

@ -0,0 +1,60 @@
<?php
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array<int, string>
*/
protected $fillable = [
'name',
'email',
'password',
'fk_id_roles',
'fk_id_grupos'
];
/**
* The attributes that should be hidden for serialization.
*
* @var array<int, string>
*/
protected $hidden = [
'password',
'remember_token',
];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function datosEmpleado(){
return $this->hasOne(Empleados::class,'fk_id_users','id');
}
public function roles(){
return $this->hasOne(Roles::class,'id','fk_id_roles');
}
public function hasRole($role)
{
return User::select('rol')->join('roles','users.fk_id_roles','=','roles.id')->where('users.id', $role)->first();
}
}

24
app/Providers/AppServiceProvider.php

@ -0,0 +1,24 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
}

26
app/Providers/AuthServiceProvider.php

@ -0,0 +1,26 @@
<?php
namespace App\Providers;
// use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The model to policy mappings for the application.
*
* @var array<class-string, class-string>
*/
protected $policies = [
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*/
public function boot(): void
{
//
}
}

19
app/Providers/BroadcastServiceProvider.php

@ -0,0 +1,19 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Broadcast::routes();
require base_path('routes/channels.php');
}
}

38
app/Providers/EventServiceProvider.php

@ -0,0 +1,38 @@
<?php
namespace App\Providers;
use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
/**
* The event to listener mappings for the application.
*
* @var array<class-string, array<int, class-string>>
*/
protected $listen = [
Registered::class => [
SendEmailVerificationNotification::class,
],
];
/**
* Register any events for your application.
*/
public function boot(): void
{
//
}
/**
* Determine if events and listeners should be automatically discovered.
*/
public function shouldDiscoverEvents(): bool
{
return false;
}
}

94
app/Providers/RouteServiceProvider.php

@ -0,0 +1,94 @@
<?php
namespace App\Providers;
use File;
use Illuminate\Cache\RateLimiting\Limit;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\RateLimiter;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
/**
* The path to the "home" route for your application.
*
* Typically, users are redirected here after authentication.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, and other route configuration.
*/
public function boot(): void
{
// $this->configureRateLimiting();
// $this->routes(function () {
// Route::middleware('api')
// ->prefix('api')
// ->group(base_path('routes/api.php'));
// Route::middleware('web')
// ->group(base_path('routes/web.php'));
// });
parent::boot();
}
public function map()
{
$this->mapApiRoutes();
$this->mapWebRoutes();
$this->mapRoutesByDirectory();
$this->mapRoutesApiByDirectory();
}
/**
* Configure the rate limiters for the application.
*/
protected function configureRateLimiting(): void
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
protected function mapRoutesByDirectory()
{
Route::group(['namespace' => $this->namespace, 'middleware'=>'web'], function ($router) {
foreach(File::allFiles(base_path().'/routes/web') as $route) {
if(preg_match("/^.*Route.php$/", $route->getPathname()))
require $route->getPathname();
}
});
}
protected function mapRoutesApiByDirectory()
{
Route::group(['prefix' => 'api', 'middleware'=>'web'], function ($router) {
foreach(File::allFiles(base_path().'/routes/api') as $route) {
if(preg_match("/^.*Api.php$/", $route->getPathname()))
require $route->getPathname();
}
});
}
}

53
artisan

@ -0,0 +1,53 @@
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any of our classes manually. It's great to relax.
|
*/
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);

55
bootstrap/app.php

@ -0,0 +1,55 @@
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;

2
bootstrap/cache/.gitignore vendored

@ -0,0 +1,2 @@
*
!.gitignore

69
composer.json

@ -0,0 +1,69 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.1",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.0",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"laravel/ui": "^4.2",
"phpoffice/phpspreadsheet": "^1.28",
"smalot/pdfparser": "^2.3"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.18",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}

8413
composer.lock generated

File diff suppressed because it is too large Load Diff

215
config/app.php

@ -0,0 +1,215 @@
<?php
use Illuminate\Support\Facades\Facade;
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Maintenance Mode Driver
|--------------------------------------------------------------------------
|
| These configuration options determine the driver used to determine and
| manage Laravel's "maintenance mode" status. The "cache" driver will
| allow maintenance mode to be controlled across multiple machines.
|
| Supported drivers: "file", "cache"
|
*/
'maintenance' => [
'driver' => 'file',
// 'store' => 'redis',
],
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => Facade::defaultAliases()->merge([
// 'ExampleClass' => App\Example\ExampleClass::class,
])->toArray(),
];

115
config/auth.php

@ -0,0 +1,115 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expiry time is the number of minutes that each reset token will be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
| The throttle setting is the number of seconds a user must wait before
| generating more password reset tokens. This prevents the user from
| quickly generating a very large amount of password reset tokens.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'table' => 'password_reset_tokens',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];

70
config/broadcasting.php

@ -0,0 +1,70 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
| Supported: "pusher", "ably", "redis", "log", "null"
|
*/
'default' => env('BROADCAST_DRIVER', 'null'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
'port' => env('PUSHER_PORT', 443),
'scheme' => env('PUSHER_SCHEME', 'https'),
'encrypted' => true,
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
],
'client_options' => [
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
],
],
'ably' => [
'driver' => 'ably',
'key' => env('ABLY_KEY'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
'null' => [
'driver' => 'null',
],
],
];

110
config/cache.php

@ -0,0 +1,110 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
| Supported drivers: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb", "octane", "null"
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
'lock_connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache/data'),
],
'memcached' => [
'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'cache',
'lock_connection' => 'default',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
'octane' => [
'driver' => 'octane',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache
| stores there might be other applications using the same cache. For
| that reason, you may prefix every cache key to avoid collisions.
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
];

34
config/cors.php

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

151
config/database.php

@ -0,0 +1,151 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'search_path' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
// 'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'false'),
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'username' => env('REDIS_USERNAME'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];

76
config/filesystems.php

@ -0,0 +1,76 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been set up for each driver as an example of the required values.
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

52
config/hashing.php

@ -0,0 +1,52 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 65536,
'threads' => 1,
'time' => 4,
],
];

123
config/logging.php

@ -0,0 +1,123 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Deprecations Log Channel
|--------------------------------------------------------------------------
|
| This option controls the log channel that should be used to log warnings
| regarding deprecated PHP and library features. This allows you to get
| your application ready for upcoming major versions of dependencies.
|
*/
'deprecations' => [
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
'trace' => false,
],
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => env('LOG_LEVEL', 'debug'),
'days' => 14,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log',
'emoji' => ':boom:',
'level' => env('LOG_LEVEL', 'critical'),
],
'papertrail' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
'facility' => LOG_USER,
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

124
config/mail.php

@ -0,0 +1,124 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default.
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses", "ses-v2",
| "postmark", "log", "array", "failover"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
// 'client' => [
// 'timeout' => 5,
// ],
],
'postmark' => [
'transport' => 'postmark',
// 'client' => [
// 'timeout' => 5,
// ],
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
],
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Example'),
],
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings
|--------------------------------------------------------------------------
|
| If you are using Markdown based email rendering, you may configure your
| theme and component paths here, allowing you to customize the design
| of the emails. Or, you may simply stick with the Laravel defaults!
|
*/
'markdown' => [
'theme' => 'default',
'paths' => [
resource_path('views/vendor/mail'),
],
],
];

93
config/queue.php

@ -0,0 +1,93 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for every one. Here you may define a default connection.
|
*/
'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'retry_after' => 90,
'after_commit' => false,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
'block_for' => 0,
'after_commit' => false,
],
'sqs' => [
'driver' => 'sqs',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => env('SQS_QUEUE', 'default'),
'suffix' => env('SQS_SUFFIX'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'after_commit' => false,
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
'block_for' => null,
'after_commit' => false,
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
*/
'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];

67
config/sanctum.php

@ -0,0 +1,67 @@
<?php
use Laravel\Sanctum\Sanctum;
return [
/*
|--------------------------------------------------------------------------
| Stateful Domains
|--------------------------------------------------------------------------
|
| Requests from the following domains / hosts will receive stateful API
| authentication cookies. Typically, these should include your local
| and production domains which access your API via a frontend SPA.
|
*/
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
'%s%s',
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
Sanctum::currentApplicationUrlWithPort()
))),
/*
|--------------------------------------------------------------------------
| Sanctum Guards
|--------------------------------------------------------------------------
|
| This array contains the authentication guards that will be checked when
| Sanctum is trying to authenticate a request. If none of these guards
| are able to authenticate the request, Sanctum will use the bearer
| token that's present on an incoming request for authentication.
|
*/
'guard' => ['web'],
/*
|--------------------------------------------------------------------------
| Expiration Minutes
|--------------------------------------------------------------------------
|
| This value controls the number of minutes until an issued token will be
| considered expired. If this value is null, personal access tokens do
| not expire. This won't tweak the lifetime of first-party sessions.
|
*/
'expiration' => null,
/*
|--------------------------------------------------------------------------
| Sanctum Middleware
|--------------------------------------------------------------------------
|
| When authenticating your first-party SPA with Sanctum you may need to
| customize some of the middleware Sanctum uses while processing the
| request. You may change the middleware listed below as required.
|
*/
'middleware' => [
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
],
];

34
config/services.php

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Mailgun, Postmark, AWS and more. This file provides the de facto
| location for this type of information, allowing packages to have
| a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
];

201
config/session.php

@ -0,0 +1,201 @@
<?php
use Illuminate\Support\Str;
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "dynamodb", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => env('SESSION_LIFETIME', 1),
'expire_on_close' => true,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => env('SESSION_CONNECTION'),
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| While using one of the framework's cache driven session backends you may
| list a cache store that should be used for these sessions. This value
| must match with one of the application's configured cache "stores".
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => env(
'SESSION_COOKIE',
Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
),
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => env('SESSION_DOMAIN'),
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you when it can't be done securely.
|
*/
'secure' => env('SESSION_SECURE_COOKIE'),
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
/*
|--------------------------------------------------------------------------
| Same-Site Cookies
|--------------------------------------------------------------------------
|
| This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we
| will set this value to "lax" since this is a secure default value.
|
| Supported: "lax", "strict", "none", null
|
*/
'same_site' => 'lax',
];

36
config/view.php

@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
resource_path('views'),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
];

1
database/.gitignore vendored

@ -0,0 +1 @@
*.sqlite*

38
database/factories/UserFactory.php

@ -0,0 +1,38 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}

36
database/migrations/2014_10_12_000000_create_users_table.php

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name',250);
$table->integer('fk_id_roles')->nullable();
$table->integer('fk_id_grupos')->nullable()->default(0);
$table->string('email',250)->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->boolean('activo')->default(1);
$table->boolean('eliminado')->default(0);
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
}
};

28
database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('password_reset_tokens');
}
};

32
database/migrations/2014_10_12_100000_create_password_resets_table.php

@ -0,0 +1,32 @@
<?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');
}
};

32
database/migrations/2019_08_19_000000_create_failed_jobs_table.php

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('failed_jobs');
}
};

33
database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
}
};

34
database/migrations/2022_06_27_174447_create_grupos_table.php

@ -0,0 +1,34 @@
<?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('grupos', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->boolean('activo')->default(1);
$table->boolean('eliminado')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('grupos');
}
};

30
database/migrations/2023_03_10_181544_create_empleados_table.php

@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('empleados', function (Blueprint $table) {
$table->id();
$table->string('clave_contpaq');
$table->string('nombre_completo');
$table->integer('fk_id_users');
$table->timestamp('fecha_registro')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('empleados');
}
};

35
database/migrations/2023_03_10_182842_create_archivos_nominas_table.php

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('archivos_nominas', function (Blueprint $table) {
$table->id();
$table->integer('fk_id_users_alta');
$table->string('nombre_archivo');
$table->string('tipo_nomina');
$table->string('ano_fiscal');
$table->string('numero_nomina');
$table->string('clave_contpaq')->nullable();
$table->boolean('activo')->default(1);
$table->boolean('eliminado')->default(0);
$table->timestamp('fecha_registro')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('archivos_nominas');
}
};

28
database/migrations/2023_03_14_182315_create_roles_table.php

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('roles', function (Blueprint $table) {
$table->id();
$table->string('rol',150);
$table->boolean('activo')->default(1);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('roles');
}
};

29
database/migrations/2023_03_19_060818_create_expirar_contrasena_table.php

@ -0,0 +1,29 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('expirar_contrasena', function (Blueprint $table) {
$table->id();
$table->integer('fk_id_users');
$table->integer('dias_expiracion');
$table->timestamp('ultima_actualizacion');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('expirar_contrasena');
}
};

28
database/migrations/2023_07_21_031511_create_empresas_table.php

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('empresas', function (Blueprint $table) {
$table->id();
$table->string('empresa');
$table->boolean('activo')->default(1);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('empresas');
}
};

29
database/seeders/DatabaseSeeder.php

@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*/
public function run(): void
{
$this->call([
UsersTableSeeder::class,
RolesTableSeeder::class,
EmpresasSeeder::class,
]);
// \App\Models\User::factory(10)->create();
// \App\Models\User::factory()->create([
// 'name' => 'Test User',
// 'email' => 'test@example.com',
// ]);
}
}

20
database/seeders/EmpresasSeeder.php

@ -0,0 +1,20 @@
<?php
namespace Database\Seeders;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class EmpresasSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('empresas')->insert(['empresa'=>'Shades']);
DB::table('empresas')->insert(['empresa'=>'Tecnoline']);
DB::table('empresas')->insert(['empresa'=>'Bimigthy']);
}
}

23
database/seeders/RolesTableSeeder.php

@ -0,0 +1,23 @@
<?php
namespace Database\Seeders;
use App\Models\Roles;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class RolesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('roles')->insert(['rol'=>'Sistemas']);
DB::table('roles')->insert(['rol'=>'Recursos Humanos']);
DB::table('roles')->insert(['rol'=>'Empleado']);
}
}

30
database/seeders/UsersTableSeeder.php

@ -0,0 +1,30 @@
<?php
namespace Database\Seeders;
use Carbon\Carbon;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use DB;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
DB::table('users')->insert([
'name'=>'Sistemas',
'fk_id_roles'=>1,
'fk_id_grupos'=>0,
'email'=>'sistemas',
'password'=> bcrypt('ZaNkV9EO'),
'activo'=>1,
'eliminado'=>0,
'created_at'=>Carbon::now(),
'updated_at'=>Carbon::now(),
]);
}
}

BIN
nominasrh-master.zip

Binary file not shown.

1840
package-lock.json generated

File diff suppressed because it is too large Load Diff

17
package.json

@ -0,0 +1,17 @@
{
"private": true,
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@popperjs/core": "^2.11.6",
"@vitejs/plugin-vue": "^4.0.0",
"axios": "^1.1.2",
"bootstrap": "^5.2.3",
"laravel-vite-plugin": "^0.7.2",
"sass": "^1.56.1",
"vite": "^4.0.0",
"vue": "^3.2.37"
}
}

31
phpunit.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./app</directory>
</include>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
<env name="MAIL_MAILER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
</php>
</phpunit>

21
public/.htaccess

@ -0,0 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

BIN
public/RE4101Q2023-3-205330-17A.pdf

Binary file not shown.

205
public/assets/extra-libs/block-ui/block-ui.js

@ -0,0 +1,205 @@
$(function () {
$(".block-card").on("click", function () {
var block_ele = $(this).closest(".card");
$(block_ele).block({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
backgroundColor: "transparent",
},
});
});
// Block sidebar
$(".block-sidenav").on("click", function () {
var block_ele = $(".left-sidebar");
$(block_ele).block({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
backgroundColor: "transparent",
},
});
});
// Block page
$(".block-default").on("click", function () {
$.blockUI({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
backgroundColor: "transparent",
},
});
});
// onBlock callback
$(".onblock").on("click", function () {
$.blockUI({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
fadeIn: 1000,
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
color: "#333",
backgroundColor: "transparent",
},
onBlock: function () {
alert("Page blocked!");
},
});
});
// onUnblock callback
$(".onunblock").on("click", function () {
$.blockUI({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
color: "#333",
backgroundColor: "transparent",
},
onUnblock: function () {
alert("Page unblocked!");
},
});
});
// Overlay callback
$(".onoverlay-click").on("click", function () {
$.blockUI({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
color: "#333",
border: 0,
padding: 0,
backgroundColor: "transparent",
},
onOverlayClick: $.unblockUI,
});
});
// Block Without Message
$(".without-msg").on("click", function () {
var block_ele = $(this).closest(".card");
$(block_ele).block({
message: null,
timeout: 2000, //unblock after 2 seconds
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
backgroundColor: "transparent",
},
});
});
// Block without overlay
$(".without-overlay").on("click", function () {
var block_ele = $(this).closest(".card");
$(block_ele).block({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
showOverlay: false,
timeout: 2000, //unblock after 2 seconds
css: {
width: 50,
height: 50,
lineHeight: 1,
color: "#fff",
border: 0,
padding: 15,
backgroundColor: "#000",
},
});
});
// Unblock on overlay click
$(".overlay-unblock").on("click", function () {
var block_ele = $(this).closest(".card");
$(block_ele).block({
message: '<i class="fas fa-spin fa-sync text-white"></i>',
overlayCSS: {
backgroundColor: "#000",
opacity: 0.5,
cursor: "wait",
},
css: {
border: 0,
padding: 0,
backgroundColor: "transparent",
},
});
$(".blockOverlay").on("click", function () {
$(block_ele).unblock();
});
});
// Growl notification
$(".growl").on("click", function () {
$.blockUI({
message: $(".growl-notification-example"),
fadeIn: 700,
fadeOut: 700,
timeout: 3000,
showOverlay: false,
centerY: false,
css: {
width: "250px",
top: "20px",
left: "",
right: "20px",
border: "none",
padding: "15px 5px",
backgroundColor: "#000",
"-webkit-border-radius": "10px",
"-moz-border-radius": "10px",
opacity: 0.9,
color: "#fff",
},
});
});
});

1
public/assets/extra-libs/c3/c3.min.css vendored

@ -0,0 +1 @@
.c3 svg{font:10px sans-serif;-webkit-tap-highlight-color:transparent}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:grey;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:1;fill-opacity:.75}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-item-hidden{opacity:.15}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-title{font:14px sans-serif}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #ccc}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max{fill:#777}.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000}.c3-chart-arc.c3-target g path{opacity:1}.c3-chart-arc.c3-target.c3-focused g path{opacity:1}

9963
public/assets/extra-libs/c3/c3.min.js vendored

File diff suppressed because it is too large Load Diff

10885
public/assets/extra-libs/c3/d3.min.js vendored

File diff suppressed because it is too large Load Diff

66
public/assets/extra-libs/calendar/calendar.css

@ -0,0 +1,66 @@
.fc-state-default {
text-shadow: none;
box-shadow: none;
}
.fc-basic-view .fc-body .fc-row {
min-height: 5rem;
}
.fc-toolbar .fc-button-group {
border: 1px solid #2961ff;
border-radius: 4px;
}
.fc-toolbar .fc-button {
background: #2961ff;
color: #fff;
border: none;
}
.fc-toolbar .fc-button:hover {
background: #2961ff;
opacity: 1;
}
.fc-toolbar .fc-button.fc-state-active {
background: #fff;
color: #2961ff;
}
.fc-widget-header {
border: 0px !important;
}
.fc-widget-content {
border-color: rgba(120, 130, 140, 0.13) !important;
}
.fc-widget-content tr {
border-bottom: none;
}
.fc-view {
margin-top: 0px;
}
.fc-toolbar {
margin: 0px;
padding: 24px 0px;
}
.fc-event {
border-radius: 0px;
border: none;
cursor: move;
color: #fff !important;
font-size: 13px;
margin: 1px -1px 0 -1px;
padding: 5px 5px;
text-align: center;
background: #40c4ff;
}

1006
public/assets/extra-libs/css-chart/css-chart.css

File diff suppressed because it is too large Load Diff

31
public/assets/extra-libs/custom-switch/bootstrap4-toggle.min.css vendored

@ -0,0 +1,31 @@
/*\
|*| ========================================================================
|*| Bootstrap Toggle: bootstrap4-toggle.css v3.6.1
|*| https://gitbrent.github.io/bootstrap4-toggle/
|*| ========================================================================
|*| Copyright 2018-2019 Brent Ely
|*| Licensed under MIT
|*| ========================================================================
\*/
:root {
--primary:#707cd2;
--secondary:#8898aa;
--danger:#ff5050;
--success:#2cd07e;
--warning:#ffc36d;
--info:#2cabe3;
--light:#f7fafc;
--dark:#343a40;
}
.btn-group-xs>.btn,.btn-xs{padding:.35rem .4rem .25rem .4rem;font-size:.875rem;line-height:.5;border-radius:.2rem}.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-1.25rem;margin-right:.35rem}.toggle{position:relative;overflow:hidden}.toggle.btn.btn-light,.toggle.btn.btn-outline-light{border-color:rgba(0,0,0,.15)}.toggle input[type=checkbox]{display:none}.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;-moz-user-select:none;-webkit-user-select:none}.toggle-group label,.toggle-group span{cursor:pointer}.toggle.off .toggle-group{left:-100%}.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}.toggle-off{position:absolute;top:0;bottom:0;left:46%;right:0;margin:0;border:0;border-radius:0;box-shadow:none}.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px;background-color:#fff}.toggle.btn-outline-primary .toggle-handle{background-color:var(--primary);border-color:var(--primary)}.toggle.btn-outline-secondary .toggle-handle{background-color:var(--secondary);border-color:var(--secondary)}.toggle.btn-outline-success .toggle-handle{background-color:var(--success);border-color:var(--success)}.toggle.btn-outline-danger .toggle-handle{background-color:var(--danger);border-color:var(--danger)}.toggle.btn-outline-warning .toggle-handle{background-color:var(--warning);border-color:var(--warning)}.toggle.btn-outline-info .toggle-handle{background-color:var(--info);border-color:var(--info)}.toggle.btn-outline-light .toggle-handle{background-color:var(--light);border-color:var(--light)}.toggle.btn-outline-dark .toggle-handle{background-color:var(--dark);border-color:var(--dark)}.toggle[class*=btn-outline]:hover .toggle-handle{background-color:var(--light);opacity:.5}.toggle.btn{min-width:3.7rem;min-height:2.15rem}.toggle-on.btn{padding-right:1.5rem}.toggle-off.btn{padding-left:1.7rem}.toggle.btn-lg{min-width:5rem;min-height:2.815rem}.toggle-on.btn-lg{padding-right:2rem}.toggle-off.btn-lg{padding-left:2rem}.toggle-handle.btn-lg{width:2.5rem}.toggle.btn-sm{min-width:3.125rem;min-height:1.938rem}.toggle-on.btn-sm{padding-right:1rem}.toggle-off.btn-sm{padding-left:1rem}.toggle.btn-xs{min-width:2.19rem;min-height:1.375rem}.toggle-on.btn-xs{padding-right:.8rem}.toggle-off.btn-xs{padding-left:.8rem}
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20rem; }
.toggle.ios .toggle-handle { border-radius: 20rem; }
.toggle.android { border-radius: 0px;}
.toggle.android .toggle-handle { border-radius: 0px; }
.slow .toggle-group { transition: left 0.7s; -webkit-transition: left 0.7s; }
.fast .toggle-group { transition: left 0.1s; -webkit-transition: left 0.1s; }
.quick .toggle-group { transition: none; -webkit-transition: none; }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save