Se cargan las modificaciones para pasarela stripe

This commit is contained in:
2026-03-12 17:17:03 -06:00
parent 46a0f8b1c3
commit 58e27fc5fc
10 changed files with 99 additions and 8 deletions
+5
View File
@@ -17,6 +17,11 @@ class Nivel extends Model
return $this->belongsToMany(Plantel::class)->withPivot('plantel_id');
}
public function nivelPlane() : BelongsToMany
{
return $this->belongsToMany(Plane::class);
}
public function existe($plantelId = null)
{
if (!$plantelId) {
+16
View File
@@ -16,6 +16,11 @@ class Plane extends Model
return $this->belongsToMany(Plantel::class)->withPivot('plantel_id');
}
public function nivelPlane() : BelongsToMany
{
return $this->belongsToMany(Nivel::class);
}
public function existe($plantelId = null)
{
if (!$plantelId) {
@@ -27,6 +32,17 @@ class Plane extends Model
->exists();
}
public function nivel($nivelId = null)
{
if (!$nivelId) {
return false;
}
return $this->nivelPlane()
->wherePivot('nivel_id', $nivelId)
->exists();
}
public function conceptos(): BelongsToMany
{
return $this->belongsToMany(Concepto::class)