File: D:/HostingSpaces/ASmits/kemi.nl/app/KommaApp/Pages/ProductionPagesComposer.php
<?php
namespace App\KommaApp\Pages;
use App\KommaApp\Pages\Models\Page;
class ProductionPagesComposer
{
public function compose($view)
{
$productionPage = Page::where('code_name', 'production')->first();
$productionPages = Page::where('lft', '>', $productionPage->lft)
->where('lft', '<', $productionPage->rgt)
->with('translation')
->where('active', 1)
->orderBy('lft')
->get();
$view->with('productionPages', $productionPages);
}
}