File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/resources/views/crud/columns Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 66 $column [' suffix' ] = $column [' suffix' ] ?? ' ' ;
77 $column [' wrapper' ][' element' ] = $column [' wrapper' ][' element' ] ?? ' pre' ;
88 $column [' text' ] = $column [' default' ] ?? ' -' ;
9+ $column [' toggle' ] = $column [' toggle' ] ?? false ;
10+
11+ if ($column [' toggle' ]) {
12+ $column [' wrapper' ][' class' ] = ' d-none mt-2' ;
13+ }
914
1015 if (is_string ($column [' value' ])) {
1116 $column [' value' ] = json_decode ($column [' value' ], true );
2025 }
2126@endphp
2227
28+ @if ($column [' toggle' ] )
29+ <button type =" button" class =" btn btn-sm btn-info" onclick =" this.nextElementSibling.classList.toggle('d-none');this.textContent=='Show'?this.textContent='Hide':this.textContent='Show'" >Show</button >
30+ @endif
2331@includeWhen (! empty ($column [' wrapper' ]), ' crud::columns.inc.wrapper_start' )
2432@if ($column [' escaped' ] )
2533{{ $column [' text' ] } }
You can’t perform that action at this time.
0 commit comments