File: D:/HostingSpaces/SBogers10/anvil.komma.pro/app/KommaApp/Machines/MachineComposer.php
<?php
namespace App\KommaApp\Machines;
use Illuminate\View\View;
class MachineComposer
{
static $machines;
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
// Only load the specialisms once
if(!static::$machines){
$activeSiteSlug = \App::getSite()->slug;
if($activeSiteSlug != 'anvil') static::$machines = config('machines.'. $activeSiteSlug);
else static::$machines = config('machines');
}
$view->with('machines', static::$machines);
}
}