Se modifican procesos para pagos en linea a travez de stripe
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user