File: D:/HostingSpaces/SBogers95/rentman.io/app/Komma/Integrations/IntegrationComposer.php
<?php
namespace App\Komma\Integrations;
use App\Komma\Integrations\Models\Integration;
class IntegrationComposer
{
public function compose($view)
{
$integrations = Integration::with('translation', 'images')
->has('images')
// We need to use a join to select the active solution because that is defined on the translations
->join('integration_translations', 'integrations.id', '=',
'integration_translations.integration_id')
->select('integrations.*', 'integration_translations.active', 'integration_translations.language_id')
->where('active', 1)
->where('show_in_component', 1)
->where('language_id', \App::getLanguage()->id)
->orderBy('lft')
->get();
$view->with(['composedIntegrations' => $integrations]);
}
}