Support the ongoing development of →
Requests Validation
Last updated 2 years ago.

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!


Your banner here too?

lucaprete lucaprete Joined 11 Feb 2017


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.