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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user