File: D:/HostingSpaces/SBogers54/csbinstallatietechniek.nl/app/Composers/Servicepoint.php
<?php namespace App\Composers;
use Illuminate\View\View;
class Servicepoint
{
/**
* @param View $view
*/
public function compose($view)
{
$code_name = $view->getData()['page']->code_name ?? NULL;
if (!$code_name) return;
// Show Stijn's data on the Service page and the default data (Patrick's) on other pages
if ($code_name == 'service') {
$servicePointImg = '/img/contactperson-michael.png';
$servicePointName = 'Michael Verhoeven';
$servicePointEmail = 'info@csbservice.nl';
$view->with([
'servicePointImg' => $servicePointImg,
'servicePointName' => $servicePointName,
'servicePointEmail' => $servicePointEmail,
]);
}
}
}