David Vincent
David Vincent
FFilament
Created by Phuc Le on 3/31/2024 in #❓┊help
Multi tenancy with multiple database support
@CGM Many thanks for your help ! Works like a charm!
49 replies
FFilament
Created by akash sagar on 5/1/2024 in #❓┊help
how to perform some stuff before dispatching an event in action
did you try ->action() and call $this->form->fill(); and $this->dispatch in it ?
3 replies
FFilament
Created by Mexata on 5/1/2024 in #❓┊help
Opening a form modal from a widget
you need to add a modal in your view : https://filamentphp.com/docs/3.x/support/blade-components/modal then you add the form into this modal content and your button should trigger $dispatch('open-modal', { id: 'edit-user' }) as mentioned in the doc
3 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
I understand your point, even if I don't totally agree. Sometimes you're right, but there are many situations where even if you can delete any, there are some records which can't be deleted. example 1 : a tasks table, each task has an owner, so I can have the viewAny permission, deleteAny permission (to gain access to the bulkAction) but I can only delete mine. Another example will be a table which contains system's entries and entries created by the user, the user can only delete the ones he created, not the system ones. There are many situations. I understand the performance issue, but in my situation I prefer to have a better system logic so I understand that I have to implement my own logic. Maybe the documentation should warn more the users on this.
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
deleted
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
oups sorry
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
Yes but from a general perspective, the actual behaviour allows a user to deleteAny (assuming he has the permission) and delete a record for which he has not the permission to. Strange behaviour to me
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
So you can say, you remove the deleteAny permission, but in that case you don't have access to the bulkAction
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
humm, you can display a list of records (viewAny) with some you can delete and some not, it does not mean you can deleteAny
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
any way, for the time being i use
Tables\Actions\DeleteBulkAction::make()
->authorize(static::canDeleteAny())
->using(function (Collection $records) {
$records->each(function ($record) {
if (static::canDelete($record)) {
$record->delete();
}
});
})
Tables\Actions\DeleteBulkAction::make()
->authorize(static::canDeleteAny())
->using(function (Collection $records) {
$records->each(function ($record) {
if (static::canDelete($record)) {
$record->delete();
}
});
})
even if it's not performant
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
"Filament uses the deleteAny() method because iterating through multiple records and checking the delete() policy is not very performant." mentioned in the doc
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
Maybe I missed smth, deleteAny policy action does not require any model, right ? So we apply delete on a collection of records without checking individual policy. Tell me if I'm wrong ?
26 replies
FFilament
Created by David Vincent on 4/29/2024 in #❓┊help
DeleteBulkAction and ForceDeleteBulkAction policies
Same thought regarding RestoreBulkAction
26 replies
FFilament
Created by Zen Nitiruj on 4/27/2024 in #❓┊help
spa mode does not seem to work with Laravel 11
It seems it's related to latest version of livewire : see https://discord.com/channels/883083792112300104/970354547723730955/1233828603624427661
4 replies
FFilament
Created by David Vincent on 4/23/2024 in #❓┊help
Plugin dev
Thanks Adam
6 replies
FFilament
Created by David Vincent on 4/22/2024 in #❓┊help
Nested Sortable
Found this https://www.hesamurai.com/nested-sort/latest, if someone interested
3 replies
FFilament
Created by David Vincent on 3/28/2024 in #❓┊help
wire-elements-modal issue
a mistake in the documentation
15 replies
FFilament
Created by David Vincent on 3/28/2024 in #❓┊help
wire-elements-modal issue
Thank you very much!
15 replies
FFilament
Created by David Vincent on 3/28/2024 in #❓┊help
wire-elements-modal issue
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/App/**/*.php',
'./Modules/**/Filament/**/*.php',
'./Modules/**/Livewire/**/*.php',
'./Modules/**/resources/**/*.php',
'./resources/views/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/awcodes/filament-tiptap-editor/resources/**/*.blade.php',
'./vendor/awcodes/filament-table-repeater/resources/**/*.blade.php',
'./vendor/awcodes/filament-versions/resources/**/*.blade.php',
'./vendor/bezhansalleh/filament-language-switch/resources/views/language-switch.blade.php',
'./vendor/solution-forest/filament-tree/resources/**/*.blade.php',
'./vendor/archilex/filament-filter-sets/**/*.php',
'./vendor/webbingbrasil/filament-maps/resources/**/*.blade.php',
'./vendor/wire-elements/modal/resources/views/*.blade.php',
'./storage/framework/views/*.php',
],
safelist: {
pattern: /max-w-(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)/,
variants: ['sm', 'md', 'lg', 'xl', '2xl']
}
}
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/App/**/*.php',
'./Modules/**/Filament/**/*.php',
'./Modules/**/Livewire/**/*.php',
'./Modules/**/resources/**/*.php',
'./resources/views/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/awcodes/filament-tiptap-editor/resources/**/*.blade.php',
'./vendor/awcodes/filament-table-repeater/resources/**/*.blade.php',
'./vendor/awcodes/filament-versions/resources/**/*.blade.php',
'./vendor/bezhansalleh/filament-language-switch/resources/views/language-switch.blade.php',
'./vendor/solution-forest/filament-tree/resources/**/*.blade.php',
'./vendor/archilex/filament-filter-sets/**/*.php',
'./vendor/webbingbrasil/filament-maps/resources/**/*.blade.php',
'./vendor/wire-elements/modal/resources/views/*.blade.php',
'./storage/framework/views/*.php',
],
safelist: {
pattern: /max-w-(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl)/,
variants: ['sm', 'md', 'lg', 'xl', '2xl']
}
}
15 replies
FFilament
Created by David Vincent on 3/28/2024 in #❓┊help
wire-elements-modal issue
no
15 replies