anuwebroot
anuwebroot
FFilament
Created by anuwebroot on 3/28/2024 in #❓┊help
Custom search
Tables\Columns\TextColumn::make('email')->searchable(), How to custom query for by default search in filament
4 replies
FFilament
Created by anuwebroot on 1/12/2024 in #❓┊help
Default Function
I've used default function it's working on create page but it's not working on edit page.Can you please suggest me.
TextInput::make('comment')
->default(function ($record) {
// Set default value based on existing 'comment' attribute or a random string
return $record->comment ?? Str::random(8);
}),
TextInput::make('comment')
->default(function ($record) {
// Set default value based on existing 'comment' attribute or a random string
return $record->comment ?? Str::random(8);
}),
3 replies
FFilament
Created by anuwebroot on 12/19/2023 in #❓┊help
Image issue
No description
4 replies
FFilament
Created by anuwebroot on 10/25/2023 in #❓┊help
Export All data
No description
4 replies
FFilament
Created by anuwebroot on 10/9/2023 in #❓┊help
Role Filter
How to role wise filter in filament ->filters([ Tables\Filters\Filter::make('Manager') ->query(fn (Builder $query): Builder => $query->hasRole('manager')) ])
5 replies
FFilament
Created by anuwebroot on 9/4/2023 in #❓┊help
Select Filter with relation
When I've a lot of data in users table and I'm applying filter on other page then the page is not working. I've used this code.
SelectFilter::make('author')->relationship('user', 'name')
->query(function (Builder $query, array $data): Builder {
return $query
->when(
$data['value'],
fn (Builder $query, $userid): Builder => $query->where('user_id',$userid),
);
}),
SelectFilter::make('author')->relationship('user', 'name')
->query(function (Builder $query, array $data): Builder {
return $query
->when(
$data['value'],
fn (Builder $query, $userid): Builder => $query->where('user_id',$userid),
);
}),
2 replies