Update ListInstallations.php
This commit is contained in:
parent
d1b7078624
commit
37f895b6a4
1 changed files with 6 additions and 1 deletions
|
@ -28,11 +28,16 @@ class ListInstallations extends ListRecords
|
|||
|
||||
$scan = new MicroweberInstallationsScanner();
|
||||
$scan->setPath($website->domain_public);
|
||||
|
||||
$installations = $scan->scanRecusrive();
|
||||
|
||||
if (!empty($installations)) {
|
||||
foreach ($installations as $installation) {
|
||||
|
||||
$findInstallation = MicroweberInstallation::where('installation_path', $installation['path'])->first();
|
||||
$findInstallation = MicroweberInstallation::where('installation_path', $installation['path'])
|
||||
->where('website_id', $website->id)
|
||||
->first();
|
||||
|
||||
if (!$findInstallation) {
|
||||
$findInstallation = new MicroweberInstallation();
|
||||
$findInstallation->website_id = $website->id;
|
||||
|
|
Loading…
Reference in a new issue