log historial
This commit is contained in:
@@ -21,9 +21,15 @@ class ShowLogHistorial extends Component
|
||||
$query = Log_historial::query();
|
||||
|
||||
if ($this->buscar) {
|
||||
$query->where('detalle', 'like', '%' . $this->buscar . '%');
|
||||
$query->where(function ($query) {
|
||||
$query->where('detalle', 'like', '%' . $this->buscar . '%')
|
||||
->orWhereHas('user', function ($query) {
|
||||
$query->where('name', 'like', '%' . $this->buscar . '%');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if ($this->filtro_fecha) {
|
||||
$query->whereDate('created_at', $this->filtro_fecha);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user