diff --git a/app/Http/Controllers/gruposController.php b/app/Http/Controllers/gruposController.php index 673c919dc51ec4708e3b157533f4663f4dde7b8c..54b259495381f9dad63c5aa2a49115692bc49ad8 100644 --- a/app/Http/Controllers/gruposController.php +++ b/app/Http/Controllers/gruposController.php @@ -2,9 +2,52 @@ namespace App\Http\Controllers; +use App\Models\Grupos; use Illuminate\Http\Request; +use Illuminate\Support\Facades\DB; +use Carbon\Carbon; -class gruposController extends Controller +class GruposController extends Controller { - // + public function index() + { + $grupos = Grupos::get(['id', 'nombre']); + return view('adminGen.catalagos.grupos', ['grupos' => $grupos]); + } + + public function store(Request $request) + { + $validated = $request->validate([ + 'nombre' => 'required|max:150', + ]); + + $grupo = new Grupos(); + $grupo->nombre = $request->nombre; + $grupo->save(); + + return redirect()->route('catalogos.grupos.get')->with('success', 'Grupo creado correctamente.'); + } + + public function update(Request $request, Grupos $grupos) + { + $validated = $request->validate([ + 'id' => 'required|min:1', + 'nombre' => 'required|max:150', + ]); + + $grupos = Grupos::find($request->id); + $grupos->nombre = $request->nombre; + $grupos->save(); + + return redirect()->route('catalogos.grupos.get')->with('success', 'Grupo actualizado correctamente.'); + } + + public function destroy($id) + { + $grupos = Grupos::findOrFail($id); + $grupos->delete(); + + return redirect()->route('catalogos.grupos.get')->with('success', 'Grupo eliminado correctamente.'); + } } + diff --git a/app/Models/grupos.php b/app/Models/grupos.php index 2e49a5fd0f76b2057480d51a10a2a759043d8cc5..57cea9a6c64ed2776f8fcf7e5b8d7de5127a1c8e 100644 --- a/app/Models/grupos.php +++ b/app/Models/grupos.php @@ -5,7 +5,20 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; -class grupos extends Model +class Grupos extends Model { use HasFactory; + + protected $primaryKey = 'id'; + + protected $fillable = [ + 'nombre', + ]; + + public function users(): HasMany { + return $this->hasMany(User::class); + + } + + public $timestamps = false; } diff --git a/database/migrations/2024_06_03_183521_create_profesions_table.php b/database/migrations/2024_06_03_183521_create_profesions_table.php index e81ad565c1bd62a2c0a7d53ec4a92adede82682c..727b7301baa278fdaa27ff29f7a4c4a21df869b9 100644 --- a/database/migrations/2024_06_03_183521_create_profesions_table.php +++ b/database/migrations/2024_06_03_183521_create_profesions_table.php @@ -15,6 +15,7 @@ public function up(): void $table->id(); $table->string('profesion'); $table->string('abreviatura'); + $table->timestamps(); }); } diff --git a/database/migrations/2024_06_03_184436_create_grupos_table.php b/database/migrations/2024_06_03_184436_create_grupos_table.php index 29f3318c81f92944666bd18f4afb79d5fc36f1ed..f1ef3f00a48d8b862362293dac2f23dcf3cf634f 100644 --- a/database/migrations/2024_06_03_184436_create_grupos_table.php +++ b/database/migrations/2024_06_03_184436_create_grupos_table.php @@ -14,6 +14,7 @@ public function up(): void Schema::create('grupos', function (Blueprint $table) { $table->id(); $table->string('nombre'); + $table->timestamps(); }); } diff --git a/database/migrations/2024_06_03_194040_create_subgrupos_table.php b/database/migrations/2024_06_03_194040_create_subgrupos_table.php index 4eaf96d13e2f6508977bf83c58accbf25850e9f3..dbca58cc82464313f68181993e42458a75d84e11 100644 --- a/database/migrations/2024_06_03_194040_create_subgrupos_table.php +++ b/database/migrations/2024_06_03_194040_create_subgrupos_table.php @@ -15,6 +15,7 @@ public function up(): void $table->id(); $table->unsignedBigInteger('grupo_id')->nullable(); $table->unsignedBigInteger('subgrupo_id')->nullable(); + $table->timestamps(); $table->foreign('grupo_id')->references('id')->on('grupos')->nullable(); $table->foreign('subgrupo_id')->references('id')->on('subgrupos')->nullable(); diff --git "a/public/C\357\200\272\357\201\234Users\357\201\234aleke\357\201\234agendagobernador\357\201\234storage\357\201\234logs/laravel.log" "b/public/C\357\200\272\357\201\234Users\357\201\234aleke\357\201\234agendagobernador\357\201\234storage\357\201\234logs/laravel.log" index 6f5d3ebc6dc727c625d47c794316cbbac44824b2..b25c80e0e1c542ec5f2d9e4fe538ad68aa30b7fc 100644 --- "a/public/C\357\200\272\357\201\234Users\357\201\234aleke\357\201\234agendagobernador\357\201\234storage\357\201\234logs/laravel.log" +++ "b/public/C\357\200\272\357\201\234Users\357\201\234aleke\357\201\234agendagobernador\357\201\234storage\357\201\234logs/laravel.log" @@ -252,3 +252,134 @@ #64 /var/www/html/public/index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request)) #65 {main} "} +[2024-06-13 19:12:06] local.ERROR: SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from `sessions` where `id` = FPnhWrGTHbnRE4l01vYILmjTY6yx7CZMTyhh60zz limit 1) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: select * from `sessions` where `id` = FPnhWrGTHbnRE4l01vYILmjTY6yx7CZMTyhh60zz limit 1) at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:813) +[stacktrace] +#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(967): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure)) +#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(946): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure)) +#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(769): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure)) +#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure)) +#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2993): Illuminate\\Database\\Connection->select('select * from `...', Array, true) +#5 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2978): Illuminate\\Database\\Query\\Builder->runSelect() +#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3566): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}() +#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2977): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure)) +#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(335): Illuminate\\Database\\Query\\Builder->get(Array) +#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2900): Illuminate\\Database\\Query\\Builder->first(Array) +#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php(97): Illuminate\\Database\\Query\\Builder->find('FPnhWrGTHbnRE4l...') +#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(113): Illuminate\\Session\\DatabaseSessionHandler->read('FPnhWrGTHbnRE4l...') +#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(101): Illuminate\\Session\\Store->readFromHandler() +#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(85): Illuminate\\Session\\Store->loadSession() +#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(147): Illuminate\\Session\\Store->start() +#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(363): Illuminate\\Session\\Middleware\\StartSession->Illuminate\\Session\\Middleware\\{closure}(Object(Illuminate\\Session\\Store)) +#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(144): tap(Object(Illuminate\\Session\\Store), Object(Closure)) +#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(116): Illuminate\\Session\\Middleware\\StartSession->startSession(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store)) +#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure)) +#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) +#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request)) +#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route)) +#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request)) +#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request)) +#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request)) +#31 /var/www/html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#33 /var/www/html/app/Http/Middleware/CheckRoles.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\CheckRoles->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#35 /var/www/html/app/Http/Middleware/CheckBanned.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\CheckBanned->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) +#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) +#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1176): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request)) +#55 /var/www/html/public/index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request)) +#56 {main} + +[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] No such file or directory at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:65) +[stacktrace] +#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(65): PDO->__construct('mysql:host=loca...', 'agenda_user', Object(SensitiveParameterValue), Array) +#1 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(83): Illuminate\\Database\\Connectors\\Connector->createPdoConnection('mysql:host=loca...', 'agenda_user', 'password_agenda...', Array) +#2 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(48): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection(Object(PDOException), 'mysql:host=loca...', 'agenda_user', 'password_agenda...', Array) +#3 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection('mysql:host=loca...', Array, Array) +#4 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(185): Illuminate\\Database\\Connectors\\MySqlConnector->connect(Array) +#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}() +#6 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1219): call_user_func(Object(Closure)) +#7 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1255): Illuminate\\Database\\Connection->getPdo() +#8 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(512): Illuminate\\Database\\Connection->getReadPdo() +#9 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(407): Illuminate\\Database\\Connection->getPdoForSelect(true) +#10 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(800): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}('select * from `...', Array) +#11 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(967): Illuminate\\Database\\Connection->runQueryCallback('select * from `...', Array, Object(Closure)) +#12 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(946): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure)) +#13 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(769): Illuminate\\Database\\Connection->handleQueryException(Object(Illuminate\\Database\\QueryException), 'select * from `...', Array, Object(Closure)) +#14 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php(398): Illuminate\\Database\\Connection->run('select * from `...', Array, Object(Closure)) +#15 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2993): Illuminate\\Database\\Connection->select('select * from `...', Array, true) +#16 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2978): Illuminate\\Database\\Query\\Builder->runSelect() +#17 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3566): Illuminate\\Database\\Query\\Builder->Illuminate\\Database\\Query\\{closure}() +#18 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2977): Illuminate\\Database\\Query\\Builder->onceWithColumns(Array, Object(Closure)) +#19 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Concerns/BuildsQueries.php(335): Illuminate\\Database\\Query\\Builder->get(Array) +#20 /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2900): Illuminate\\Database\\Query\\Builder->first(Array) +#21 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/DatabaseSessionHandler.php(97): Illuminate\\Database\\Query\\Builder->find('FPnhWrGTHbnRE4l...') +#22 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(113): Illuminate\\Session\\DatabaseSessionHandler->read('FPnhWrGTHbnRE4l...') +#23 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(101): Illuminate\\Session\\Store->readFromHandler() +#24 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Store.php(85): Illuminate\\Session\\Store->loadSession() +#25 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(147): Illuminate\\Session\\Store->start() +#26 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(363): Illuminate\\Session\\Middleware\\StartSession->Illuminate\\Session\\Middleware\\{closure}(Object(Illuminate\\Session\\Store)) +#27 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(144): tap(Object(Illuminate\\Session\\Store), Object(Closure)) +#28 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(116): Illuminate\\Session\\Middleware\\StartSession->startSession(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store)) +#29 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure)) +#30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#31 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#33 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(75): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#35 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#36 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) +#37 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request)) +#38 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route)) +#39 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request)) +#40 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request)) +#41 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request)) +#42 /var/www/html/vendor/livewire/livewire/src/Features/SupportDisablingBackButtonCache/DisableBackButtonCacheMiddleware.php(19): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#43 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Livewire\\Features\\SupportDisablingBackButtonCache\\DisableBackButtonCacheMiddleware->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#44 /var/www/html/app/Http/Middleware/CheckRoles.php(29): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#45 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\CheckRoles->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#46 /var/www/html/app/Http/Middleware/CheckBanned.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#47 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): App\\Http\\Middleware\\CheckBanned->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#48 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#49 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#51 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#52 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(51): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#53 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#54 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#55 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#56 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(110): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#57 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#58 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#59 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\HandleCors->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#60 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#61 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure)) +#62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request)) +#63 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure)) +#64 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) +#65 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(1176): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request)) +#66 /var/www/html/public/index.php(17): Illuminate\\Foundation\\Application->handleRequest(Object(Illuminate\\Http\\Request)) +#67 {main} +"} diff --git a/resources/views/adminGen/catalagos/grupos.blade.php b/resources/views/adminGen/catalagos/grupos.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..2f4121ff812aeded22f244cf7caa93184cb04052 --- /dev/null +++ b/resources/views/adminGen/catalagos/grupos.blade.php @@ -0,0 +1,272 @@ + + + + + +
+ +
+ +
+
+
+ + + +
+
+
+ + + + + + + + + +
IdNombreAcciones
+ +
+
+ + + + + +
\ No newline at end of file diff --git a/routes/web.php b/routes/web.php index b5300ff920b67dd8fa21e2e7f7b60602e96d3b5b..95e14f6f7117bdd670328b7806454736cd3a4640 100644 --- a/routes/web.php +++ b/routes/web.php @@ -7,6 +7,7 @@ use App\Http\Controllers\CargoController; use App\Http\Controllers\CaracteristicasController; use App\Http\Controllers\DependenciaController; +use App\Http\Controllers\GruposController; use App\Http\Controllers\UserController; Route::get('/', function () { @@ -34,6 +35,11 @@ Route::post('/caracteristicas', [CaracteristicasController::class, 'store'])->name('caracteristicas.store'); Route::put('/caracteristicas', [CaracteristicasController::class, 'update'])->name('caracteristicas.update'); Route::delete('/caracteristicas/{id}', [CaracteristicasController::class, 'destroy'])->name('caracteristicas.destroy'); + + Route::get('/grupos', [GruposController::class, 'index'])->name('grupos.get'); + Route::post('/grupos', [GruposController::class, 'store'])->name('grupos.store'); + Route::put('/grupos', [GruposController::class, 'update'])->name('grupos.update'); + Route::delete('/grupos/{id}', [GruposController::class, 'destroy'])->name('grupos.destroy'); }); Route::name('catalogos.')->group(function () {