GavTheDev
GavTheDev
FFilament
Created by GavTheDev on 8/13/2024 in #❓┊help
Overwrite views from package
I thought of that too so think I'm gonna do that. But it feels a bit dirty 😅
7 replies
FFilament
Created by GavTheDev on 8/13/2024 in #❓┊help
Overwrite views from package
@toeknee I know, but I need to replace the whole topbar and see no other option other than copy files 😕
7 replies
FFilament
Created by GavTheDev on 6/27/2024 in #❓┊help
Plugin count on filamentphp.com always off by 2
Ah ok! 🙂
3 replies
FFilament
Created by GavTheDev on 5/4/2024 in #❓┊help
Wizard: different steps based on value in step 1
No 😕 But would love to hear it if you have!
7 replies
FFilament
Created by GavTheDev on 4/12/2024 in #❓┊help
Use another column in the url for ID
@awcodes Turns out it was way easier than I had thought initially (was probably overthinking it). I remembered you can just add the key to the route:
public static function getPages(): array
{
return [
'index' => Pages\ListOrders::route('/'),
'create' => Pages\CreateOrder::route('/create'),
'edit' => Pages\EditOrder::route('/{record:reference}/edit'),
'details' => Pages\ViewOrderDetails::route('/{record:reference}/details'
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListOrders::route('/'),
'create' => Pages\CreateOrder::route('/create'),
'edit' => Pages\EditOrder::route('/{record:reference}/edit'),
'details' => Pages\ViewOrderDetails::route('/{record:reference}/details'
];
}
and then override the function that resolves the record:
protected function resolveRecord(int | string $key): Model
{
$record = Order::whereReference($key)->first();

if ($record === null) {
throw (new ModelNotFoundException())->setModel($this->getModel(), [$key]);
}

return $record;
}
protected function resolveRecord(int | string $key): Model
{
$record = Order::whereReference($key)->first();

if ($record === null) {
throw (new ModelNotFoundException())->setModel($this->getModel(), [$key]);
}

return $record;
}
8 replies
FFilament
Created by GavTheDev on 4/12/2024 in #❓┊help
Use another column in the url for ID
Sorry, I'm not sure if I follow 😅 . I'm talking about retrieving OrderResource by the reference and not the ID because I don't want people to know how many orders there are. An order is not a relationship? Maybe my question is poorly phrased?
8 replies
FFilament
Created by GavTheDev on 3/20/2024 in #❓┊help
Only one primary row when toggled in table
Thanks, that is an option indeed. But in this case I'm specically looking for that option that I know I have seen somewhere. Perhaps it was a plugin?
5 replies
FFilament
Created by Diogo Gomes on 8/4/2023 in #❓┊help
Custom Profile Page for logged in user
This profile page feels so un-filament-like 🤨 . Most likely there's thought behind it but I don't get it 😅
68 replies
FFilament
Created by GavTheDev on 2/20/2024 in #❓┊help
Switch between 2 types of sellers in same panel?
Solved it by creating a DesignerPage and ManufacturerPage with a shouldRegisterNavigation() and extend the other pages from that:
class DesignerPage extends Page
{
public static function shouldRegisterNavigation(): bool
{
if (Filament::auth()->user()->designer) {
return true;
}

return false;
}
}
class DesignerPage extends Page
{
public static function shouldRegisterNavigation(): bool
{
if (Filament::auth()->user()->designer) {
return true;
}

return false;
}
}
Could probably be done better, but for now it works 😎
4 replies
FFilament
Created by jabs on 2/20/2024 in #❓┊help
Multiple Panels, 1 Login Screen
Top! @Tieme
7 replies
FFilament
Created by jabs on 2/20/2024 in #❓┊help
Multiple Panels, 1 Login Screen
I would like to know also 😎
7 replies
FFilament
Created by GavTheDev on 2/19/2024 in #❓┊help
Switch between seller and buyer
Darn, I can't believe I did not search for that 😅 . Thanks!
4 replies
FFilament
Created by GavTheDev on 11/25/2023 in #❓┊help
Update attribute outside of form
I'm making calculations on a form but the total has to be reflected somewhere else on the page/component. This seems to work (simplified), not sure though if this is the right way.
->afterStateUpdated(function (Livewire $livewire) {
$livewire->total = 12345;
}
}),

// On the view
<div class="py-8 font-bold text-lg">Subtotaal: &euro;{{ $total }}</div>
->afterStateUpdated(function (Livewire $livewire) {
$livewire->total = 12345;
}
}),

// On the view
<div class="py-8 font-bold text-lg">Subtotaal: &euro;{{ $total }}</div>
6 replies
FFilament
Created by GavTheDev on 9/25/2023 in #❓┊help
Spatie Media Library in Builder
Would be nice indeed to have media library images in the builder. I thought I had seen it in v2 but maybe that was something different. I think Repeater? If I'm correct that stored the media ID in data 🤔
4 replies
FFilament
Created by GavTheDev on 8/13/2023 in #❓┊help
Confused about multiple dashboards
Overriding routes() does the trick, thanks, but isn't the slug automatically generated from the page class name then? This would produce different slugs 🤔
16 replies
FFilament
Created by GavTheDev on 8/13/2023 in #❓┊help
Confused about multiple dashboards
Thanks, actually I'm just checking out the new features and stumbled upon this issue and was wondering if I did something wrong. I don't really need it 🙂
16 replies
FFilament
Created by GavTheDev on 6/26/2023 in #❓┊help
Spatie Settings together with Translatable
Thanks 😢
5 replies
FFilament
Created by GavTheDev on 5/31/2023 in #❓┊help
Add a letter navigation bar on list page
The green check?
21 replies
FFilament
Created by GavTheDev on 5/31/2023 in #❓┊help
Add a letter navigation bar on list page
Noob question but how do I mark it as solved? 😅
21 replies
FFilament
Created by GavTheDev on 5/31/2023 in #❓┊help
Add a letter navigation bar on list page
But will do once I got it working!
21 replies