Pritbor
Pritbor
FFilament
Created by Pritbor on 6/20/2024 in #❓┊help
Using Filament Notification number in Frontpage notification icon
thanks @nanopanda . I went thruogh this doc. just wanted filamentphp reusable options.
7 replies
FFilament
Created by Pritbor on 6/20/2024 in #❓┊help
Using Filament Notification number in Frontpage notification icon
thanks @Leandro Ferreira both do my job.
7 replies
FFilament
Created by Pritbor on 6/11/2024 in #❓┊help
Select form not retrieving data using getSearchResultsUsing()
3 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
Sure @Tally . I was struggling with Morph relationship. Cause Table needs a way to know Model type.
16 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
thanks alot its working. So I can use ->state not just for image column rather anywhere for any morph relationship. Thanks alot.
16 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
Actually I have been able to one at a time either ImageColumn::make('memberable->profile_photo_path') or ImageColumn::make('memberable->profile->logo') for user or company but not generically for both depending upon member_type. since I have MorphOne elation.
16 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
But it say
ImageColumn::formatStateUsing does not exist.
ImageColumn::formatStateUsing does not exist.
16 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
You mean, i should choose any random 'string' in make() and use ->formatStateUsing() to define my callback.
16 replies
FFilament
Created by Pritbor on 5/28/2024 in #❓┊help
how to show a MorphOne table in filament Table?
Hi @Tally .. thanks for quick response. Is not my return is string.
16 replies
FFilament
Created by Pritbor on 5/9/2024 in #❓┊help
How to use CreateAction while creating record
Yes... I realised if you have CreatePage already created then CreateAction will never start first.
5 replies
FFilament
Created by Pritbor on 5/9/2024 in #❓┊help
how to have Custom Select Layout during Create
Thanks @Forgi90 .. Wizard is surely helpful. However my primary challenge is to achieve above way of selection of category as a first step. I guess I will have to develop custom field component for Select.
4 replies
FFilament
Created by mohdaftab on 1/9/2024 in #❓┊help
How to use FilamentPHP Fabricator Route on custom Livewire component?
You can also create shortcodes for your livewire component and add in your content block.
4 replies
FFilament
Created by Pritbor on 4/22/2024 in #❓┊help
Adding different pivotData in N:N relationship
I used below code to solve my challenge. I used repeater in BelongsToMany relationship and used dependent select.
Forms\Components\Select::make('property_type_id')
->relationship(name: 'propertyType', titleAttribute: 'name', modifyQueryUsing: function (Builder $query, Get $get) {
$query->whereHas('propertyCategories', function ($q) use ($get) {
$q->where('property_category_id', $get('property_category_id'));
});
})
->searchable()
->preload()
->live()
->afterStateUpdated(function (Set $set) {
$set('propertyAmenities', null);
})
->required(),


Forms\Components\Repeater::make('propertyPropertyTypeFeatures')
->relationship()
->schema([
Forms\Components\Select::make('property_type_feature_id')
->relationship('propertyTypeFeature', 'name', modifyQueryUsing: function (Builder $query, Get $get) {
$query->whereHas('propertyTypes', function ($q) use ($get) {
$q->where('property_type_id', $get('../../property_type_id'));
// $q->where('property_type_id', 1);
});
})
->live()
->afterStateUpdated(function (Set $set) {
$set('selected_feature_types', null);
})
->required(),

Forms\Components\TextInput::make('number')
->integer(),

Forms\Components\TextInput::make('max_number')
->integer(),

Forms\Components\Select::make('selected_feature_types')
->multiple()
->options(function (callable $get){
$selectOptions = PropertyTypeFeature::find($get('property_type_feature_id'));
if($selectOptions){
return $selectOptions->available_feature_type;
}
return null;
})
->preload()
->searchable(),
]),
Forms\Components\Select::make('property_type_id')
->relationship(name: 'propertyType', titleAttribute: 'name', modifyQueryUsing: function (Builder $query, Get $get) {
$query->whereHas('propertyCategories', function ($q) use ($get) {
$q->where('property_category_id', $get('property_category_id'));
});
})
->searchable()
->preload()
->live()
->afterStateUpdated(function (Set $set) {
$set('propertyAmenities', null);
})
->required(),


Forms\Components\Repeater::make('propertyPropertyTypeFeatures')
->relationship()
->schema([
Forms\Components\Select::make('property_type_feature_id')
->relationship('propertyTypeFeature', 'name', modifyQueryUsing: function (Builder $query, Get $get) {
$query->whereHas('propertyTypes', function ($q) use ($get) {
$q->where('property_type_id', $get('../../property_type_id'));
// $q->where('property_type_id', 1);
});
})
->live()
->afterStateUpdated(function (Set $set) {
$set('selected_feature_types', null);
})
->required(),

Forms\Components\TextInput::make('number')
->integer(),

Forms\Components\TextInput::make('max_number')
->integer(),

Forms\Components\Select::make('selected_feature_types')
->multiple()
->options(function (callable $get){
$selectOptions = PropertyTypeFeature::find($get('property_type_feature_id'));
if($selectOptions){
return $selectOptions->available_feature_type;
}
return null;
})
->preload()
->searchable(),
]),
4 replies
FFilament
Created by Pritbor on 4/14/2024 in #❓┊help
Using Placeholder giving error.
Thanks @Ashk . I did minor change in your second code which was giving error. I used below
Placeholder::make('created')
->content(fn (?Model $record): string => $record?->created_at->toFormattedDateString() ?? '-')
Placeholder::make('created')
->content(fn (?Model $record): string => $record?->created_at->toFormattedDateString() ?? '-')
. And it is working like a charm. Thanks to you.
5 replies
FFilament
Created by Pritbor on 3/14/2024 in #❓┊help
ImportAction with relationship not resolving
BTW I did try originally this code but got same error.
ImportColumn::make('classifiedCategory')
->relationship(resolveUsing: 'slug')
->requiredMapping()
->exampleHeader('ClassifiedCategory Slug')
ImportColumn::make('classifiedCategory')
->relationship(resolveUsing: 'slug')
->requiredMapping()
->exampleHeader('ClassifiedCategory Slug')
3 replies
FFilament
Created by Pritbor on 2/15/2024 in #❓┊help
Profile Picture in Panel Sidebar
Thanks alot. Yes, I got the documentation. PanelsRenderHook::SIDEBAR_NAV_START renderhook following documentation should work for me. https://filamentphp.com/docs/3.x/support/render-hooks#registering-render-hooks
5 replies
FFilament
Created by K R A T O S on 2/9/2024 in #❓┊help
PHP database connection error
Please check if your MariaDB server is running in Docker Desktop.
15 replies
FFilament
Created by Pritbor on 2/10/2024 in #❓┊help
Do we need Spatie Permission with Filament Shield?
Yes. I have come across the Breezy plugin. Just got confused among multiple choices. And then you have filament inherent authentication system. Thanks alot.
13 replies
FFilament
Created by Pritbor on 2/10/2024 in #❓┊help
Do we need Spatie Permission with Filament Shield?
Thanks alot. What do you use generally for multi-authentication?
13 replies
FFilament
Created by Pritbor on 2/10/2024 in #❓┊help
Do we need Spatie Permission with Filament Shield?
Thanks @awcodes . Do you mean a separate Spatie Permission package is not needed? Will jetstream be needed if I want multi-authentication with advance authentication features?
13 replies