You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Pest architecture test (arch()->preset()->laravel()) enforces that Form Request classes should only be used in Controllers. However, CpdSave.php is importing CpdRequest to reuse its validation rules:
CpdSave.php is a livewire full page controller, am I doing something bad/wrong here? Or should Pest architecture test be adjusted to allow Form Requests to be used in Livewire?
I was able to resolve it by setting arch()->preset()->laravel()->ignoring('App\Livewire'); as a workarround.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Pest architecture test (arch()->preset()->laravel()) enforces that Form Request classes should only be used in Controllers. However, CpdSave.php is importing CpdRequest to reuse its validation rules:CpdSave.phpis a livewire full page controller, am I doing something bad/wrong here? Or should Pest architecture test be adjusted to allow Form Requests to be used in Livewire?I was able to resolve it by setting
arch()->preset()->laravel()->ignoring('App\Livewire');as a workarround.Beta Was this translation helpful? Give feedback.
All reactions