How can I add an asterisk next to a required field when using ->rules(['required'])?

How can I add an asterisk next to a required field when using ->rules(['required'])?

I tried using ->markAsRequired(), but that seems to only work as a modifier to ->required(). I am not using the ->required() method because I don't want browser validation; only Laravel validations.

Here is my code:

TextInput::make('sample')
    ->rules(['required'])
    ->markAsRequired()


See image for the output.
image.png
Was this page helpful?