Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user