FYI, I've tried to do the same thing with a class, and also this didn't work.
To give you some basic code, with the trait:
trait MyTrait extends FormRequest { ... }
class ClassOne { use MyTrait; }
class ClassTwo { use MyTrait; }
With classes and no traits:
class MyMainClass extends FormRequest { ... }
class ClassOne extends MyMainClass { ... }
class ClassTwo extends MyMainClass { ... }
Thanks again!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community