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

what is systems manager

 = session connect ayinappudu cloud watch lo store ayyi vuntadhi = https://us-east-1.console.aws.amazon.com/systems-manager/session-manager/...