Query:

@csrf

Excuted:

@if(isset($actions))
{{-- Generate the table headers dynamically based on the first item keys --}} @if(isset($actions[0])) @foreach(array_keys((array) $actions[0]) as $header) @endforeach @endif @foreach($actions as $action) {{-- Loop through the action object dynamically --}} @foreach($action as $value) @endforeach @endforeach
{{ ucwords(str_replace('_', ' ', $header)) }}
{{ $value }}
@endif