Oddman
Oddman
FFilament
Created by jimarick on 1/5/2024 in #❓┊help
Select field - Multiple & Search
Huh?
6 replies
FFilament
Created by jimarick on 1/5/2024 in #❓┊help
Select field - Multiple & Search
I also have the issue whereby the selected option is being replaced.
6 replies
FFilament
Created by jimarick on 1/5/2024 in #❓┊help
Select field - Multiple & Search
I'm having this exact problem - did you end up solving it?
6 replies
FFilament
Created by Oddman on 11/7/2023 in #❓┊help
Datepicker timezones - I don't get this
No
11 replies
FFilament
Created by Gediminas on 2/19/2024 in #❓┊help
Sticky form buttons
Yeah this doesn't seem to work all that well, maybe that's why it's not documented? I see it sticky at the top, but soon as I scroll down it disappears.
13 replies
FFilament
Created by Oddman on 2/21/2024 in #❓┊help
When logged out and accessing a panel, it's sending me to the site's main login
OMG, found it. hahaha. That was easy. Just need to add: ->login() to your panel provider configuration 😄
4 replies
FFilament
Created by Oddman on 12/27/2023 in #❓┊help
How do you handle models with custom route keys?
Yeah I've found a few cases where laravel conventions get in my way. It's rare, however.
5 replies
FFilament
Created by Oddman on 12/27/2023 in #❓┊help
How do you handle models with custom route keys?
Actually, all good - decided to disable the routeKey and instead just handle it manually, as I was going to do that for route model binding anyway.
5 replies
FFilament
Created by Oddman on 11/26/2023 in #❓┊help
Get previous/next record in table?
Figured it out, but it's pretty nasty. Basically I ask the records from the Table injected object, and then loop through to find the right records. as needed
3 replies
FFilament
Created by Jia Yong Lim on 11/27/2023 in #❓┊help
Reset Filter according to getEloquentQuery
Remember to mark the right answer 🙂
12 replies
FFilament
Created by Jia Yong Lim on 11/27/2023 in #❓┊help
Reset Filter according to getEloquentQuery
That's not 100% right code, you'll need to fix it - but that's kinda what you want.
12 replies
FFilament
Created by Jia Yong Lim on 11/27/2023 in #❓┊help
Reset Filter according to getEloquentQuery
Eg. On your ListResource page:
public function table(Table $table): Table
{
$table = parent::table($table);

if ($authUser->role == 'restaurant-admin') {
$rewardIds = Reward::where('restaurant_id', $authUser->restaurant_id)->pluck('id');

$table->modifyQueryUsing(fn(QueryBuilder $query) => $query->whereIn('reward_id', $rewardIds));
}

return $table;
}
public function table(Table $table): Table
{
$table = parent::table($table);

if ($authUser->role == 'restaurant-admin') {
$rewardIds = Reward::where('restaurant_id', $authUser->restaurant_id)->pluck('id');

$table->modifyQueryUsing(fn(QueryBuilder $query) => $query->whereIn('reward_id', $rewardIds));
}

return $table;
}
12 replies
FFilament
Created by Jia Yong Lim on 11/27/2023 in #❓┊help
Reset Filter according to getEloquentQuery
Right, you want to modifyBaseQuery, I believe.
12 replies
FFilament
Created by Jia Yong Lim on 11/27/2023 in #❓┊help
Reset Filter according to getEloquentQuery
What are you trying to do? Don't detail the technical implementation, what is the use-case you're looking to support?
12 replies
FFilament
Created by Bourbakki on 11/26/2023 in #❓┊help
Whats the difference between using a classic Laravel Observer and an afterCreate method on Filament?
The afterCreate method is specifically for Filament "things" you may want to do. Setting up an observer is absolutely fine 🙂
4 replies
FFilament
Created by Oddman on 11/12/2023 in #❓┊help
How to link to a resource from a repeater entry?
Ah, cool. ty 🙂
11 replies
FFilament
Created by Oddman on 11/12/2023 in #❓┊help
How to link to a resource from a repeater entry?
I thought there'd be something like: TextInput::make('category')->linkToResource() .etc.
11 replies
FFilament
Created by Oddman on 11/12/2023 in #❓┊help
How to link to a resource from a repeater entry?
Oh there’s no generator method or anything?
11 replies
FFilament
Created by Oddman on 11/12/2023 in #❓┊help
How to link to a resource from a repeater entry?
How do you link to a related resource?
11 replies
FFilament
Created by Oddman on 11/12/2023 in #❓┊help
How to link to a resource from a repeater entry?
@Leandro Ferreira there's nothing to share, I have no idea how to do it 🙂
11 replies