From 8cc6a9cc6343a2d42c6eb2a18013dad23b67d24f Mon Sep 17 00:00:00 2001 From: KodeStar Date: Thu, 17 Mar 2022 13:41:50 +0000 Subject: [PATCH] Pull missing apps on update apps list --- app/Jobs/ProcessApps.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/Jobs/ProcessApps.php b/app/Jobs/ProcessApps.php index 588be5f9..67549afc 100644 --- a/app/Jobs/ProcessApps.php +++ b/app/Jobs/ProcessApps.php @@ -10,6 +10,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Support\Facades\Storage; use App\Application; use App\SupportedApps; +use App\Item; class ProcessApps implements ShouldQueue { @@ -42,5 +43,13 @@ class ProcessApps implements ShouldQueue $app->save(); } + $items = Item::whereNotNull('class')->get(); + foreach($items as $item) { + if(!file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) { + $app = Application::where('class', $item->class)->first(); + Application::getApp($app->appid); + } + } + } }