update
This commit is contained in:
@@ -8,6 +8,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Historiale extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'fecha_inicio',
|
||||
'fecha_final',
|
||||
@@ -24,7 +25,7 @@ class Historiale extends Model
|
||||
|
||||
public function vendedor()
|
||||
{
|
||||
return $this->belongsTo(User::class , 'vendedor_id');
|
||||
return $this->belongsTo(User::class, 'vendedor_id');
|
||||
}
|
||||
|
||||
public function tarifa()
|
||||
|
||||
@@ -16,11 +16,15 @@ class Log_general extends Model
|
||||
'detalle',
|
||||
'tipo',
|
||||
'historial_id'
|
||||
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function historial()
|
||||
{
|
||||
return $this->belongsTo(Historiale::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,4 +102,9 @@ class User extends Authenticatable
|
||||
{
|
||||
return $this->belongsTo(User::class, 'subvendedor_id');
|
||||
}
|
||||
|
||||
public function subusuarios()
|
||||
{
|
||||
return $this->hasMany(User::class, 'subvendedor_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user