fix: Corregir autenticación API, bypass de pago y relaciones de modelos

- Corregir middleware Authenticate para retornar JSON 401 en rutas API
- Agregar método unauthenticated() en Handler para respuestas JSON
- Implementar bypass de pago en ContractController
- Corregir relaciones belongsToMany en Postulations y Suppliers
- Corregir concatenación de strings en NoHomeController

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-27 23:48:27 +00:00
parent f571caa204
commit 689e456fe5
6 changed files with 122 additions and 66 deletions

View File

@@ -44,7 +44,7 @@ class Postulations extends Model
public function suppliers()
{
return $this->hasMany(Suppliers::class);
return $this->belongsToMany(Suppliers::class, 'postulations_suppliers', 'postulations_id', 'suppliers_id')->withTimestamps();
}
public function status()

View File

@@ -55,7 +55,7 @@ class Suppliers extends Model
public function postulations()
{
return $this->belongsToMany(Postulations::class)->withTimestamps();
return $this->belongsToMany(Postulations::class, 'postulations_suppliers', 'suppliers_id', 'postulations_id')->withTimestamps();
}
public function payments()