namespace Cubist\Backpack\Magic\Fields;
+use Cubist\Backpack\CubistBackpackServiceProvider;
+
class URL extends Field
{
protected $_adminType = 'url';
protected $_databaseType = 'text';
+
+ protected $_columnType = 'url';
+ protected $_columnViewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::columns';
}
try {
$instance->refreshDatabase();
} catch (\Exception $exception) {
-
+ Log::error($exception);
}
}
}
$inserts = [];
foreach ($toInsert as $hash) {
- $inserts[$hash] = $rows[$hash];
+ if (isset($rows[$hash])) {
+ $inserts[$hash] = $rows[$hash];
+ }
}
try {
--- /dev/null
+{{-- regular object attribute --}}
+@php
+ $value = data_get($entry, $column['name']);
+ $value = is_array($value) ? json_encode($value) : $value;
+@endphp
+
+<span>
+ @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_start')
+ <a href="{{$value}}" target="_blank">{{ $value }}</a>
+ @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_end')
+</span>