24 lines
433 B
PHP
Executable File
24 lines
433 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Saldo extends Model
|
|
{
|
|
use HasFactory;
|
|
protected $fillable = [
|
|
'valor',
|
|
'usuario_id'
|
|
];
|
|
|
|
public function usuario(){
|
|
return $this ->belongsTo(User::class);
|
|
}
|
|
|
|
public function recargas(){
|
|
return $this ->hasMany(recarga::class, 'saldo_id');
|
|
}
|
|
}
|