Patrick | Der Echte!
Orchestral / Laravel Dusk: "Undefined variable $content" on login
Hello there,
I am currently working on a package for Filament PHP, and I want to implement tests using Laravel Dusk. However, I’m running into issues when trying to make Filament PHP work with Orchestral / Laravel Dusk.
Whenever I try to load
/admin/login
in a Laravel Dusk test, I receive the error Undefined variable $content
in the file vendor/filament/forms/resources/views/components/checkbox.blade.php
. However, when I access the same route via the Orchestral Workbench serve command (vendor/bin/testbench serve
), everything works as expected. Feature tests are also working without any issues.
Dan Harrin suggested ensuring that the RyanChandler\BladeCaptureDirective\BladeCaptureDirectiveServiceProvider
is loaded in the environment, which in my case would be Laravel Dusk. To confirm this, I’ve checked the output of App::providerIsLoaded(...)
and App::getLoadedProviders()
to ensure that the provider is indeed being loaded, along with the same providers as those loaded by the serve
command.
Despite this, the issue persists.
Any ideas on what I might be missing?
Thank You!4 replies
afterStateUpdated $old does not work after using Builder/Block
Hey,
i am currently trying to use
afterStateUpdated
on a TextInput
in combination with a Builder.
The resource i am working on does have a *title *and a *slug *attribute that i have implemented as described in the documentation as well as a Builder
.
My issue is that after i have used any field inside a Block
, the the $old
parameter of the afterStateUpdated
callback does equal the new value and not the old value. However, if i use any other field outside of the Builder
, like test, before i change the title, it does work again.
I am using the following code:
Any idea what could be wrong?4 replies