@php $currentPath = request()->path(); // Fetch active forms for the current page $activeWidgetForms = \App\Models\WidgetForm::where('is_active', true) ->where(function($query) use ($currentPath) { $query->where('page_location', '*') ->orWhere('page_location', $currentPath) ->orWhere('page_location', '/' . $currentPath); }) ->orderBy('id', 'asc') ->get(); @endphp @foreach($activeWidgetForms as $index => $form)