how to create trait and whats the benefits and use

 create folder trait

Trait nameoftrait{

}


class MyClass {

    use MyTrait;

    

    // Class methods and properties

}




multiple inheritance
use controller -> single inheritance
traits multiple inheritance
reusable of code
duplication of code removes


No comments:

Post a Comment

React -1 ( react with ravenndra kanchi)

 react with tool chanis 45 to 50 sessions core  after 50 sessions -> some tooll chains == react with type script mern stackaplication in ...