The Huntsman
Mutate form data before create but for delete
what about the
after()
and before()
methods that's available on the delete action ?
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/delete#lifecycle-hooks12 replies
search for foreign key using multiple columns
I tried it and I'm getting this error when searching: https://flareapp.io/share/W7zD2QAm
7 replies
search for foreign key using multiple columns
public static function form(Form $form): Form
{
return $form
->schema([
Select::make('inventory_id')
->searchable()
->getSearchResultsUsing(fn (string $search): array => Inventory::where('productName', 'barcode', 'partNumber', "%{$search}%")->limit(50)->pluck('productName','id')->toArray())
->getOptionLabelsUsing(fn ($value): ?string => Inventory::find($value)?->productName),
]);
}
7 replies
Array to String
Please ensure that any pivot attributes are listed in the withPivot() method of the relationship and inverse relationship.So does that mean I have to list all pivot table columns using the withPivot() method? Also that part of the documentation is very uninformative 😥
8 replies
images are not showing up in table
okay I found out from stackoverflow that the issue was with the symlink to the the storage folder.
had to run,
composer require symfony/filesystem
then delete the current storage symlink and run,
php artisan storage:link --relative
which worked, anyhow thanks everyone.14 replies