<?php
namespace App\Services;
use App\Services\Models\Service;
use Illuminate\View\View;
class ServiceComposer
{
/**
* @param View $view
*/
public function compose(View $view)
{
$serviceGroups = Service::where('active', 1)
->with('translation')
->get()
->groupBy('service_type');
$view->with(['serviceGroups' => $serviceGroups]);
}
}