Frank Wiebe
Frank Wiebe
FFilament
Created by Frank Wiebe on 8/6/2024 in #❓┊help
filament()->getTenant() null in bootUsing
When dd'ing filament()->getTenant() in the panels bootUsing method it returns null no matter where I navigate to
3 replies
FFilament
Created by Frank Wiebe on 3/23/2024 in #❓┊help
Access the current tenant in the importer resolveRecord() method
I'm using filament multitenancy. And I created an import for users. However, when I try to access the current tenant in the resolveRecord method to associate the user with the team I get Call to a member function members() on null.
public function resolveRecord(): ?User
{
$team = Filament::getTenant();

$user = User::firstOrNew([
'email' => $this->data['email'],
]);

$team->members()->associate($user->id);

return $user;
}
public function resolveRecord(): ?User
{
$team = Filament::getTenant();

$user = User::firstOrNew([
'email' => $this->data['email'],
]);

$team->members()->associate($user->id);

return $user;
}
My team model has
public function members(): BelongsToMany
{
return $this->belongsToMany(User::class);
}
public function members(): BelongsToMany
{
return $this->belongsToMany(User::class);
}
8 replies
FFilament
Created by Frank Wiebe on 3/22/2024 in #❓┊help
Add tenant slug to Sparks return url
I'm using miltitenantcy, and Laravel Spark. When viewing the spark billing page, how do I set the url when clicking "Return to..." link? This link returns the user to "/" but I want it to return them to "/tenant-slug" where tenant-slug is the team slug. Any ideas?
11 replies
FFilament
Created by Frank Wiebe on 11/24/2023 in #❓┊help
Repeater Index
How can I get the index of the repeater item? I want to add an index or id to each item when it saves to the database This is what I'm looking for, the index increments for each item in the repeater
[
{
"index": "1",
"toDate": "2014-02-16",
"fromDate": "2022-10-12",
}
{
"index": "2",
"toDate": "2014-02-16",
"fromDate": "2022-10-12",
}
]
[
{
"index": "1",
"toDate": "2014-02-16",
"fromDate": "2022-10-12",
}
{
"index": "2",
"toDate": "2014-02-16",
"fromDate": "2022-10-12",
}
]
9 replies