HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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,
            ]);
        }
    }
}