Search posts, tags, users, and pages
Kerry Owston
Web Developer
Method chaining is a technique where a class with multiple methods can have those methods chained together and called in sequence into a single command. A benefit of this can be cleaner and less repetitive code. As an example, I created a helper clas...
David Carr
Web developer
Chaining methods is really handy, for instance when sending email using Microsoft 365 I set the package so I can do this:
MsGraph::emails() ->to($email) ->subject($subject) ->body($body) ->attachments($files) ->send();
David Carr
Web developer
Chaining methods is really handy, for instance when sending email using Microsoft 365 I set the package so I can do this: