Kymset
Kymset
FFilament
Created by Kymset on 10/1/2024 in #❓┊help
Testing Relation Managers
Bumping this
4 replies
FFilament
Created by Kymset on 9/4/2024 in #❓┊help
Acting As Returning 403
Figured it out. It was because my Admin model did not implement FilamentUser
4 replies
FFilament
Created by Kymset on 8/5/2024 in #❓┊help
Chart Widget - Ticks
Thanks @Dennis Koch I have managed to get this sorted by doing the following:
protected function getOptions(): RawJs
{
return RawJs::make(<<<JS
{
scales: {
y: {
min: 0,
ticks: {
stepSize: 1,
},
},

},
plugins: {
legend: {
display: false
},
}
}
JS);
}
protected function getOptions(): RawJs
{
return RawJs::make(<<<JS
{
scales: {
y: {
min: 0,
ticks: {
stepSize: 1,
},
},

},
plugins: {
legend: {
display: false
},
}
}
JS);
}
5 replies
FFilament
Created by Kymset on 7/10/2024 in #❓┊help
Widget Sections
Bumping
4 replies
FFilament
Created by julianwayu on 6/28/2024 in #❓┊help
Hidden Action and action modal not opening. But if remove hidden the modal works
Hey @julianwayu, I tried the following code:
Tables\Actions\Action::make('uploadCover')
->hidden(fn ($record): bool => $record->id % 2 != 0)
->form([
Forms\Components\FileUpload::make('cover')
->label('Cover')
->image()
->directory('covers')
])
->action(function (array $data, Model $record): void {
dd($data, $record);
})
Tables\Actions\Action::make('uploadCover')
->hidden(fn ($record): bool => $record->id % 2 != 0)
->form([
Forms\Components\FileUpload::make('cover')
->label('Cover')
->image()
->directory('covers')
])
->action(function (array $data, Model $record): void {
dd($data, $record);
})
This worked for me and opened up the modal
38 replies
FFilament
Created by julianwayu on 6/28/2024 in #❓┊help
Hidden Action and action modal not opening. But if remove hidden the modal works
Hi @julianwayu, I can give it a go later on tonight 🙂 Will update you with the results
38 replies
FFilament
Created by Kymset on 6/26/2024 in #❓┊help
Relationship manager - Issues when using a union relation
I think I have found a solution but not sure if it is a good one. If anyone (especially filament team) could say whether it is the best solution please let me know. Within my relationship manager I have had to override this function:
public function getFilteredSortedTableQuery(): Builder
{
$query = $this->getFilteredTableQuery();

$this->applyGroupingToTableQuery($query);

// $this->applySortingToTableQuery($query);


return $query;
}
public function getFilteredSortedTableQuery(): Builder
{
$query = $this->getFilteredTableQuery();

$this->applyGroupingToTableQuery($query);

// $this->applySortingToTableQuery($query);


return $query;
}
This means that I cannot have sortable on any of my columns. I assume there is a better way which would be to override the applySortingToTableQuery so the order gets applied correctly
6 replies
FFilament
Created by Kymset on 6/26/2024 in #❓┊help
Relationship manager - Issues when using a union relation
Bumping up
6 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
Maybe worth looking at your setup. Could be something to do with docker / valet / laragon / other Could be something in your mysql setup causing that to take longer. Honestly a whole lot could be the source of the problem 🙄
16 replies
FFilament
Created by Jessy on 6/29/2024 in #❓┊help
Creating a user when a client is created.
For this o would probably use an observer: https://laravel.com/docs/11.x/eloquent#defining-observers Using this you can create a listener on your model so anytime a record is created you can run some code to send notifications ect.
4 replies
FFilament
Created by Kymset on 6/26/2024 in #❓┊help
Relationship manager - Issues when using a union relation
Bump
6 replies
FFilament
Created by EL REKT on 6/28/2024 in #❓┊help
Hide submit button on wizard
I am assuming from your screenshot this is a modal. Here in the docs it shows how to remove modal submit: https://filamentphp.com/docs/3.x/actions/modals#removing-a-default-modal-footer-action-button Hope that helps 🙂
6 replies
FFilament
Created by julianwayu on 6/28/2024 in #❓┊help
Hidden Action and action modal not opening. But if remove hidden the modal works
No description
38 replies
FFilament
Created by nowak on 6/28/2024 in #❓┊help
Maximum execution time of 30 seconds exceeded
It looks like you are getting this error on the list page of a resource. Are you able to see individual records without getting this error? If you are able to share the code / screenshot of the page you are trying to access people can help more The solution to this maybe to go into your php.ini file and increase the execution time
max_execution_time = 60
max_execution_time = 60
16 replies
FFilament
Created by ericmp on 6/27/2024 in #❓┊help
Trouble trying to summarize
Not sure I can help much as I haven't delved into summaries yet. This may not be the right solution but have a look at custom summaries: https://filamentphp.com/docs/3.x/tables/summaries#custom-summaries Using this you maybe able to make your own query:
TextColumn::make('id_text')
->summarize(Summarizer::make()
->label('Count Test')
->using(fn (Builder $query): string => $query->count('id_test')))
TextColumn::make('id_text')
->summarize(Summarizer::make()
->label('Count Test')
->using(fn (Builder $query): string => $query->count('id_test')))
Hope it helps
4 replies
FFilament
Created by zemo on 6/27/2024 in #❓┊help
Show a Select instead of the list of the tabs in the List page
Another solution using filters could be this for it to be less complex:
SelectFilter::make('created_at')
->options([
'2022'
'2023'
'2024'
])
->query(function (Builder $query, $data) {
if ($data['value'] === null) {
return $query;
}
return $query->whereYear($data['value']);
});
}),
SelectFilter::make('created_at')
->options([
'2022'
'2023'
'2024'
])
->query(function (Builder $query, $data) {
if ($data['value'] === null) {
return $query;
}
return $query->whereYear($data['value']);
});
}),
I haven't tested this bit of code out but it is something along those lines
10 replies
FFilament
Created by kisut on 6/28/2024 in #❓┊help
Not saving all the input
Can you post the code of your form? Also what kind of value should track_primary_artist be? I assume boolean?
2 replies
FFilament
Created by Kymset on 6/26/2024 in #❓┊help
Relationship manager - Issues when using a union relation
Commenting to keep this active
6 replies
FFilament
Created by zemo on 6/27/2024 in #❓┊help
Show a Select instead of the list of the tabs in the List page
No description
10 replies