* * @version 1.0.0 */ class Client extends Model { protected $fillable = [ 'name', 'paternal', 'maternal', 'full_name', 'email', 'phone', 'rfc', ]; public function sales() { return $this->hasMany(Sale::class); } public function clientSims() { return $this->hasMany(ClientSim::class); } public function simCards() { return $this->belongsToMany(SimCard::class, 'client_sims') ->withPivot('assigned_at', 'released_at', 'is_active') ->withTimestamps(); } public function fullName(): Attribute { return Attribute::make( get: fn () => $this->name . ' ' . $this->paternal . ' ' . $this->maternal, ); } }