Show different content on the index, edit and create page
I have a laravel nova cms. And I have a Gradient resource. One of the Gradient fields is the css property
Text::make('CSS Property', 'css_property', function () { $gradient = DB::table('gradients') ->where('id', $this->id) ->first(); return ""; }) ->asHtml().
This is working fine on the index page because I want to show a div with the gradient value defined in this field so its possible to have a small visual how the gradient looks like.
However, on the create/edit page on the text input it shows like this:
<div style='background: linear-gradient(0.25turn, #3f87a6, #ebf8e1, #f69d3c);'></div>
Do you know how to fix the create/edit page so that it appears the text input for the user to insert the css property value like "linear-gradient(0.25turn, #3f87a6, #ebf8e1, #f69d3c);"?
Please or to participate in this conversation.