Pull missing apps on update apps list
This commit is contained in:
parent
18001fbdd0
commit
8cc6a9cc63
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue