rubendn
rubendn
FFilament
Created by rubendn on 9/14/2024 in #❓┊help
2 Different Tables For The Same Resource
jawaad is on the right path. Let's say it's the User model. I want to have one table that shows the list of records with certain fields from the User model and another table that shows other fields from the User model but I would like the Add/Edit Form to be the same for both so if I make changes to the form, I don't have to make it in 2 places which I would have to do if I create 2 separate resources for the one model.
9 replies
FFilament
Created by rubendn on 6/5/2024 in #❓┊help
New Project Recommended Installation Steps/Order?
Sorry, I could have probably been more specific. When you install a new laravel project with Breeze using Livewire it installs Livewire. Will there be any type of conflict when you install Filament which installs Livewire? Do I remove it from composer.json? If it remove it from composer.json can I still use Livewire on the non-Filament pages?
6 replies
FFilament
Created by rubendn on 4/11/2024 in #❓┊help
FileUpload Previewing with File Name not based on Stored Field
I am using the simple modal forms and the mutateFormDataBeforeFill() was not working so I switched to regular resources and it works with the following to show the preview:
protected function mutateFormDataBeforeFill(array $data): array
{
$file = public_path('front/images/player_photos/' . $data['PlayerID'] . '.jpg');
if (file_exists($file)) {
$data['player_photo'] = 'front/images/player_photos/' . $data['PlayerID'] . '.jpg';
} else {
$data['player_photo'] = null;
}


return $data;
}
protected function mutateFormDataBeforeFill(array $data): array
{
$file = public_path('front/images/player_photos/' . $data['PlayerID'] . '.jpg');
if (file_exists($file)) {
$data['player_photo'] = 'front/images/player_photos/' . $data['PlayerID'] . '.jpg';
} else {
$data['player_photo'] = null;
}


return $data;
}
Is there a way to use the mutateFormDataBeforeFill when using simple modal form resources?
5 replies
FFilament
Created by rubendn on 4/11/2024 in #❓┊help
FileUpload Previewing with File Name not based on Stored Field
Verified the APP_URL and it is set correctly. Is there a way to set a custom preview URL?
5 replies
FFilament
Created by rubendn on 11/20/2023 in #❓┊help
Keydown Event on Input Field
The keydown event on the Select not creating a simple Select.
6 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
Thank you.
15 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
Thanks @Hugh Messenger I'll try it out. Do you have the code for the quick demo you put together?
15 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
I've looked all around but can't find any hints on how to do this with a repeater field. The data is not in JSON and I want to be able to save each record individually, not submit and save all the repeaters at the same time. How this is currently working is it reads a folder of images and then creates an array and then a form is created for each image. On save, the data is saved to a new record in the database, the image is moved to a new directory. There is also the option of copying some fields to the next forms On Save if they are going to be the same. The main reason for wanting to do it in a standard Filament form is to be able to use some of the great field types such as a searchable Select and an Input with autocomplete without having to code those. I'm already using the filament blade components for styling purposes.
15 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
Possibly but I haven't found any kind of similar example to save a new record from a repeater field.
15 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
I've uploaded a video of what I'm trying to accomplish. This was done in a Filament panel but without using Filament forms.
15 replies
FFilament
Created by rubendn on 10/21/2023 in #❓┊help
Many Identical Forms on the Same Custom Page
Yes, I've seen this but I'm talking about a large number (50+) that are identical and the number is not known ahead of time.
15 replies
FFilament
Created by rubendn on 9/25/2023 in #❓┊help
Markdown Editor Preview in V3?
@Patrick Boivin Thank you.
10 replies
FFilament
Created by rubendn on 9/25/2023 in #❓┊help
Markdown Editor Preview in V3?
Thanks @Patrick Boivin Do you mind sharing the code snippet to add the preview to the markdown editor?
10 replies
FFilament
Created by ianclemence on 8/25/2023 in #❓┊help
Error while upgrading from v2 to v3
After Filament is upgraded is there a need to run the automatic upgrade for Livewire "php artisan livewire:upgrade"?
12 replies
FFilament
Created by ianclemence on 8/25/2023 in #❓┊help
Error while upgrading from v2 to v3
I also found that line misleading and if I try to run "composer require livewire/livewire "^3.0"" to upgrade Livewire first, I get the following error:
- filament/filament is locked to version v2.17.53 and an update of this package was not requested.
- filament/filament v2.17.53 requires livewire/livewire ^2.10.7 -> found livewire/livewire[v2.10.7, ..., v2.12.6] but it conflicts with your root composer.json require (^3.0).
- filament/filament is locked to version v2.17.53 and an update of this package was not requested.
- filament/filament v2.17.53 requires livewire/livewire ^2.10.7 -> found livewire/livewire[v2.10.7, ..., v2.12.6] but it conflicts with your root composer.json require (^3.0).
Do I need to change the Filament version in Composer.json before upgrading Livewire? Thanks!
12 replies
FFilament
Created by rubendn on 8/29/2023 in #❓┊help
Viewing image after upload with FileUpload component - insecure resource
Nevermind. The APP_URL had reverted back to http instead of https. After updating, it works correctly.
3 replies
FFilament
Created by rubendn on 8/11/2023 in #❓┊help
Icon Visibility on Text Column depending on record value
Thank you. That worked.
8 replies
FFilament
Created by rubendn on 8/10/2023 in #❓┊help
Add HTML to Card value in Widget
Perfect. Worked.
Card::make('Links:',new HtmlString('<a href="/filament/resources/orders">Orders</a></br><a href="/filament/resources/orders">Orders</a>')),
Card::make('Links:',new HtmlString('<a href="/filament/resources/orders">Orders</a></br><a href="/filament/resources/orders">Orders</a>')),
Thank You!
6 replies
FFilament
Created by rubendn on 5/17/2023 in #❓┊help
Display Action Text in Table as Button
Thank you for leading me in the right direction... This worked:
Tables\Columns\TextColumn::make('tracking')
->action(
Action::make('updateShipping')
->action(function (Model $record, array $data): void {
$record->ConfirmationNumber = $data['ConfirmationNumber'];
$record->save();
\Mail::to($record->EmailAddress)->send(new \App\Mail\TrackingNumber($record));
})
->form([
TextInput::make('ConfirmationNumber')
->label('Delivery Confirmation #')
->required(),
]))
->icon('heroicon-o-truck')
->label('Tracking')
->placeholder('SHIP'),
Tables\Columns\TextColumn::make('tracking')
->action(
Action::make('updateShipping')
->action(function (Model $record, array $data): void {
$record->ConfirmationNumber = $data['ConfirmationNumber'];
$record->save();
\Mail::to($record->EmailAddress)->send(new \App\Mail\TrackingNumber($record));
})
->form([
TextInput::make('ConfirmationNumber')
->label('Delivery Confirmation #')
->required(),
]))
->icon('heroicon-o-truck')
->label('Tracking')
->placeholder('SHIP'),
10 replies
FFilament
Created by rubendn on 5/17/2023 in #❓┊help
Display Action Text in Table as Button
If I’m adding an action on a textcolumn how do I define the modal?
10 replies