Skip to content

Commit

Permalink
update url column
Browse files Browse the repository at this point in the history
  • Loading branch information
pxpm committed Sep 19, 2024
1 parent f76027e commit 7fa108b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/resources/views/crud/columns/url.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
@php
$column['value'] = $column['value'] ?? data_get($entry, $column['name']);
$column['wrapper']['element'] = $column['wrapper']['element'] ?? 'a';
$column['wrapper']['target'] = $column['wrapper']['target'] ?? '_blank';
$column['wrapper']['element'] = $column['wrapper']['element'] ?? $column['element'] ?? 'a';
$column['wrapper']['target'] = $column['wrapper']['target'] ?? $column['target'] ?? '_blank';
$column['wrapper']['href'] = $column['value'];
$rel = $column['wrapper']['rel'] ?? $column['rel'] ?? null;
if($rel !== false) {
$column['wrapper']['rel'] = $rel ?? 'noreferrer';
}
@endphp
@include('crud::columns.text')

0 comments on commit 7fa108b

Please sign in to comment.