Closed gavinhewitt closed 2 years ago
I was just about to open an issue like this. Though a bit more generic - readonly Link fields.
Right now I'm doing this:
Text::make('Preview')
->resolveValueUsing(fn (Text $field) => route('docs.page', $field->form['slug']->value))
->renderAs(fn ($field, $value) => "<a target='_blank' class='styled' href='{$value}'>Preview</a>")
->stored(false),
Done in dev-master.
Would be nice to make the text a link to an action: