*/
public function defineDbColumn($table)
{
+ if ($this->getDatabaseType() === 'none') {
+ return;
+ }
$name = $this->getAttribute('name');
if ($name === 'created_at' || $name === 'updated_at') {
return;
--- /dev/null
+<?php
+
+namespace Cubist\Backpack\app\Magic\Fields;
+
+
+use Cubist\Backpack\CubistBackpackServiceProvider;
+
+class StaticValue extends Field
+{
+ protected $_adminType = 'static_value';
+ protected $_databaseType = 'none';
+ protected $_translatable = false;
+ protected $_viewNamespace = CubistBackpackServiceProvider::NAMESPACE . '::fields';
+
+}
--- /dev/null
+<!-- text input -->
+@include('crud::fields.inc.wrapper_start')
+<label>{!! $field['label'] !!}</label>
+@include('crud::fields.inc.translatable_icon')
+
+@if(isset($field['prefix']) || isset($field['suffix'])) <div class="input-group"> @endif
+ {{ old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '' }}"
+{{-- HINT --}}
+@if (isset($field['hint']))
+<p class="help-block">{!! $field['hint'] !!}</p>
+@endif
+</div>