laravel-filament-seo
laravel-filament-seo copied to clipboard
how to change style of seo form
how to add a hint in each input field
Hey @muhammedfayaz, thank you for your message! I'm afraid that that is not yet possible right now, but I am open to a PR that changes the SEO
class to this:
class SEO
{
public static function make(array $only = ['title', 'author', 'description'], Closure $modifyTitleFieldUsing = null, ...): Group
{
return Group::make(function (Group $component) use ($modifyTitleFieldUsing) {
$titleField = TextInput::make('title')
->translateLabel()
->label(__('filament-seo::translations.title'))
->columnSpan(2);
if ($modifyTitleFieldUsing) {
$titleField = $component->evaluate($titleField, ['field' => $titleField], [$titleField::class => $titleField]);
}
return Arr::only([
'title' => $titleField,
// ...
// ...
I talked about the hint below field not the title
Yes, I just used the title field as example, but you would implement it like this for every other input field, so you can in the end just choose what you want. I don't have time quickly to implement this myself, but as I said I'm open to a PR if you are.
@ralphjsmit Would it be possible to add something like ->translatable() using the closure?
@AlexanderFalkenberg If this closure functionally is PR'ed (I talked about that I was open for a PR to it), then it would be possible yes, as you could yourself modify the TextInput and other form fields (each field a closure $modify..
closure). Don't have the time to do it myself right now but if you want to PR I'm totally okay.