---
title: "Discussion on \"Chaining methods from a Laravel  helper class\" | Hashnode"
description: "Discussion on \"Chaining methods from a Laravel  helper class\". 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.\nA benefit of this can be cleaner and less repetitive code.\nAs an example, I created a helper clas..."
url: "https://hashnode.com/posts/chaining-methods-from-a-laravel-helper-class/65ac302fcb2e6d91057a6d27"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Chaining methods from a Laravel helper class](https://blog.kerryowston.co.uk/chaining-methods-from-a-laravel-helper-class?utm_source=hashnode&utm_medium=feed)

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...

Jan 20, 2024 · 3 min read · blog.kerryowston.co.uk  
Read the article

-   [#laravel](https://hashnode.com/tag/laravel)
-   [#begginers](https://hashnode.com/tag/begginers)
-   [#newbie](https://hashnode.com/tag/newbie)

## Written by

[Kerry Owston](https://hashnode.com/@KerryOwston)

@KerryOwston · Anlaby, UK

  
[View profile](https://hashnode.com/@KerryOwston)

Web Developer

I used to build websites back when tables were used for HTML 4 layouts and not everyone bothered with CSS. I got drawn into the fascinating world of digital marketing, but lately I've been looking back with fond nostalgia at my web dev days. The variety of tools and technologies available today is both overwhelming and exciting - I'm so glad to be able to dive back in!

## Responses

Markdown supported · ⌘↵ to post

[David Carr](https://hashnode.com/@dcblogdev)

[Jan 25, 2024](https://hashnode.com/posts/chaining-methods-from-a-laravel-helper-class/65ac302fcb2e6d91057a6d27/comment/65b280644f7b6aec3a8aa74a)

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();
```
