John Wink
John Wink
FFilament
Created by jouni.i on 9/24/2023 in #❓┊help
Filament\Pages\BasePage::getInfolist(): Argument #1 ($name) must be of type string, null given
Fuuuuu I'm facing exactly the same problem right now. 😢
5 replies
FFilament
Created by HeyWeb on 5/14/2024 in #❓┊help
getNavigationBadge()
?
20 replies
FFilament
Created by Trauma Zombie on 5/14/2024 in #❓┊help
How to correctly typehint or set return types for IDE support and autocomplete?
Then u should check before with method_exists
4 replies
FFilament
Created by HeyWeb on 5/14/2024 in #❓┊help
getNavigationBadge()
Nice, you saw for yourself that
::pluck
::pluck
doesn't work but returns more than one number 🙂
20 replies
FFilament
Created by Roland Barkóczi on 5/14/2024 in #❓┊help
Translation hasMany relation: how to populate form and field by locale
Maybe something like this:
protected function mutateFormDataBeforeFill(array $data): array
{
$record = $this->record->loadMissing(‘translations’);

// Load required translations into $data
// $data[‘name’] = $record->name_en;
// Dynamic locale:
// $field = 'name_'.$locale;
// $data[‘name’] = $record->$field;

return parent::mutateFormDataBeforeFill($data);
}
protected function mutateFormDataBeforeFill(array $data): array
{
$record = $this->record->loadMissing(‘translations’);

// Load required translations into $data
// $data[‘name’] = $record->name_en;
// Dynamic locale:
// $field = 'name_'.$locale;
// $data[‘name’] = $record->$field;

return parent::mutateFormDataBeforeFill($data);
}
In the edit page of the respective resource? Otherwise via ->fillForm() if you call it via an action?
13 replies
FFilament
Created by Trauma Zombie on 5/14/2024 in #❓┊help
How to correctly typehint or set return types for IDE support and autocomplete?
Try this
Toggle::macro(‘warningHint’, function (\Closure|bool|null $condition, \Closure|string|null $message): static {
return $this->hintIcon($condition ? ‘heroicon-c-exclamation-triangle’ : null)
->hintColor(‘yellow’)
->hintIconTooltip($message);
});
Toggle::macro(‘warningHint’, function (\Closure|bool|null $condition, \Closure|string|null $message): static {
return $this->hintIcon($condition ? ‘heroicon-c-exclamation-triangle’ : null)
->hintColor(‘yellow’)
->hintIconTooltip($message);
});
because ViewComponent does not have the method hintIcon hintColour hintIconTooltip. You should check whether these methods are available in your target Component, if not it will not work there.
4 replies
FFilament
Created by Reaper8911 on 5/13/2024 in #❓┊help
Database Import Issue
The column probably has ‘’ as its value. So it is an empty string. However, it must be NULL for it to be recognised correctly.
8 replies
FFilament
Created by Pscl on 5/14/2024 in #❓┊help
Dashboard in SubNavigation
Is this page registered in the Panel Provider?
17 replies
FFilament
Created by رجل الجمبري on 5/14/2024 in #❓┊help
Repeater add new item to the top
This should do what u want 🙂
->addAction(function (Repeater $component): void {
$newUuid = $component->generateUuid();
$items = array_merge(
[$newUuid => []],
$component->getState(),
);
$component->state($items);
$component->getChildComponentContainer($newUuid)->fill();
$component->collapsed(false, shouldMakeComponentCollapsible: false);
$component->callAfterStateUpdated();
})
->addAction(function (Repeater $component): void {
$newUuid = $component->generateUuid();
$items = array_merge(
[$newUuid => []],
$component->getState(),
);
$component->state($items);
$component->getChildComponentContainer($newUuid)->fill();
$component->collapsed(false, shouldMakeComponentCollapsible: false);
$component->callAfterStateUpdated();
})
5 replies
FFilament
Created by Roland Barkóczi on 5/14/2024 in #❓┊help
Translation hasMany relation: how to populate form and field by locale
In your case it would be very helpful if you had a demo repo. This way it is very difficult to understand what it should do and what it is currently doing
13 replies
FFilament
Created by HeyWeb on 5/14/2024 in #❓┊help
getNavigationBadge()
public static function getNavigationBadge(): ?string
{
return static::getModel()::where('stock_minimo','>',100)->count();
}
public static function getNavigationBadge(): ?string
{
return static::getModel()::where('stock_minimo','>',100)->count();
}
20 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
yes except the additional pages followup, won-lost, clearing, bank
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No description
17 replies
FFilament
Created by John Wink on 4/17/2024 in #❓┊help
Cluster Pages + Navigation Groups
No, definitely not. Because what it says doesn't help me
17 replies