bugs fix search dan daily monitoring
This commit is contained in:
@@ -57,9 +57,11 @@ class RequestLogController extends Controller
|
||||
$q->where('final_log', $final_log);
|
||||
})
|
||||
->when($request->search, function ($q, $search) {
|
||||
$q->where('code', 'LIKE', "%".$search."%");
|
||||
$q->orWhereHas('member', function ($subQuery) use ($search) {
|
||||
$subQuery->where('name', 'LIKE', "%".$search."%");
|
||||
$q->where(function ($subQuery) use ($search) {
|
||||
$subQuery->where('code', 'LIKE', "%".$search."%")
|
||||
->orWhereHas('member', function ($subSubQuery) use ($search) {
|
||||
$subSubQuery->where('name', 'LIKE', "%".$search."%");
|
||||
});
|
||||
});
|
||||
})
|
||||
->when($request->orderBy, function ($q, $orderBy) use ($request) {
|
||||
@@ -424,7 +426,7 @@ class RequestLogController extends Controller
|
||||
// if($requestLog->service_code != 'IP'){
|
||||
// $requestLog->discharge_date = Carbon::now();
|
||||
// }
|
||||
|
||||
|
||||
$requestLog->save();
|
||||
|
||||
|
||||
@@ -921,7 +923,7 @@ class RequestLogController extends Controller
|
||||
// Menghapus file dari penyimpanan
|
||||
if (Storage::exists($path)) {
|
||||
Storage::delete($path);
|
||||
|
||||
|
||||
// Update entri file dari basis data
|
||||
File::where('path', $request->path)->update([
|
||||
'deleted_at' => Carbon::now(), // Gunakan Carbon untuk mendapatkan tanggal dan waktu saat ini
|
||||
|
||||
Reference in New Issue
Block a user