fede8100
How to get $data in Tables\Actions\CreateAction::make()?
I used to get the $data in the form using
->before(function (RelationManager $livewire, array $data, Tables\Actions\CreateAction $action) {
if ($data['total'] > 0) {
But it doesn't work now, probably since some upgrade.
This is a Table inside a RelationManager.
Any help?
5 replies
How to refresh the whole form, with relationmanagers, after an action?
refreshFormData refreshes just some fields, I want to refresh the whole page, like reload, but not loading the CSS etc, just the Livewire refresh for the shole page.
Is it possible?
7 replies
How to extend ViewResource but show a custom view?
The view is protected, so it keeps loading the original view from ViewResource.
I need to access all the functions in ViewResource, Permissions, Page Actions, etc. But I want to show just a custom Livewire component inside. I have also tried extending Page, but including some functions from ViewResource. But the Page Actions don't work.
2 replies
I have a morphedByMany multiplies relations
I have a morphedByMany relationship and this code Forms\Components\Select::make('products')
->multiple()
->relationship('products', 'name')
->getSearchResultsUsing(fn (string $search) => Product::where('name', 'like', "%{$search}%")
->orWhere('sku', 'like', "%{$search}%")
->limit(10)->pluck('name', 'id'))
->getOptionLabelUsing(fn ($value): ?string => Product::find($value)?->name),
It is multiplying the entries in the table, it should sync instead of save?
4 replies