<?php
 namespace ModStart\App\Web\Middleware; use ModStart\Form\Form; use ModStart\Support\Manager\FieldManager; use Illuminate\Http\Request; use ModStart\Support\Manager\WidgetManager; class BootstrapMiddleware { public function handle(Request $request, \Closure $next) { FieldManager::registerBuiltinFields(); WidgetManager::registerBuiltinWidgets(); if (file_exists($bootstrap = modstart_web_path('bootstrap.php'))) { require $bootstrap; } return $next($request); } } 