Se modifican procesos para pagos en linea a travez de stripe

This commit is contained in:
2026-03-12 12:27:26 -06:00
parent fac20ea52d
commit ed2184827d
32 changed files with 703 additions and 506 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Alumno extends Model
{
protected $guarded = [];
public function plantelUsuarios(): BelongsToMany
{
return $this->belongsToMany(Plantel::class);
}
public function existe($plantelId): bool
{
return $this->plantelUsuarios()
->where('plantels.id', $plantelId)
->exists();
}
public function alumnos() : BelongsToMany
{
return $this->belongsToMany(User::class);
}
}
-31
View File
@@ -1,31 +0,0 @@
<?php
namespace App\Models;
use App\Models\Plantel;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Prospecto extends Model
{
protected $guarded = [];
public function plantelUsuarios(): BelongsToMany
{
return $this->belongsToMany(Plantel::class);
}
public function existe($plantelId): bool
{
return $this->plantelUsuarios()
->where('plantels.id', $plantelId)
->exists();
}
public function prospectos() : BelongsToMany
{
return $this->belongsToMany(User::class);
}
}
+2 -2
View File
@@ -125,9 +125,9 @@ class User extends Authenticatable
}
public function prospectos() : BelongsToMany
public function alumnos() : BelongsToMany
{
return $this->belongsToMany(Prospecto::class);
return $this->belongsToMany(Alumno::class);
}
protected static function booted()