modified assests
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\Laboratory;
|
||||
use App\Models\Organization;
|
||||
use App\Models\Publication;
|
||||
use App\Models\PublicationReceiver;
|
||||
use Illuminate\Console\Command;
|
||||
@@ -43,10 +43,10 @@ class NotifyExpireLab extends Command
|
||||
public function handle()
|
||||
{
|
||||
try{
|
||||
$labs = Laboratory::query()->where('record_status_id', 1)
|
||||
$labs = Organization::query()->where('record_status_id', 1)
|
||||
->whereNotNull('end_date')
|
||||
->whereRaw("DATEDIFF(end_date, CURDATE())=7")->get();
|
||||
|
||||
|
||||
Log::channel('jobs')->info($labs);
|
||||
|
||||
foreach ($labs as $lab){
|
||||
@@ -65,7 +65,7 @@ class NotifyExpireLab extends Command
|
||||
|
||||
PublicationReceiver::query()->create([
|
||||
'publication_id' => $publication->id,
|
||||
'lab_id' => $lab->id,
|
||||
'organization_id' => $lab->id,
|
||||
'created_by' => 1
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user