Geoff.
Geoff.
FFilament
Created by malivodka on 3/21/2024 in #❓┊help
new Resource not working after setting up multi-tenancy..
You should use this in your resource
protected static bool $isScopedToTenant = false;
protected static bool $isScopedToTenant = false;
3 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Thanks for the help ❤️
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Yeah, I will just add
Filament::bootCurrentPanel();
Filament::bootCurrentPanel();
to my setup before each test. This is working
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Filament::bootCurrentPanel();
Filament::bootCurrentPanel();
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
I think this could be ok to use
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Really appreciate the help btw
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Yeah thats working.
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
and when going to the webpage it is logging correct
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Ok, its logging nothing
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Where to put this?
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Yeah indeed 😄
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
When I ds in the boot function I don't get any log
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Yeah still app
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
First log is giving admin and second one is giving app
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
ds(Filament::getCurrentPanel());
\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
ds(Filament::getCurrentPanel());
ds(Filament::getCurrentPanel());
\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
ds(Filament::getCurrentPanel());
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
beforeEach(function () {
createTenantDatabase();
$this->TenantLogin();
});
beforeEach(function () {
createTenantDatabase();
$this->TenantLogin();
});
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
public function TenantLogin(): void
{
tenancy()->initialize(getTenant());
$user = \App\Models\App\User::query()->where('name', 'admin')->first();
$store = Store::query()->where('slug', 'test')->first();

$this->actingAs($user);

\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
\Filament\Facades\Filament::setTenant($store, true);
}
public function TenantLogin(): void
{
tenancy()->initialize(getTenant());
$user = \App\Models\App\User::query()->where('name', 'admin')->first();
$store = Store::query()->where('slug', 'test')->first();

$this->actingAs($user);

\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
\Filament\Facades\Filament::setTenant($store, true);
}
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Ah it is on a function i run before each test
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
Thats already in my test
\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
\Filament\Facades\Filament::setTenant($store, true);
\Filament\Facades\Filament::setCurrentPanel(\Filament\Facades\Filament::getPanel('app'));
\Filament\Facades\Filament::setTenant($store, true);
45 replies
FFilament
Created by Geoff. on 4/3/2024 in #❓┊help
Macro is not working when testing with Pest
But Plugin is registered on the AppPanelProvider
45 replies