---
title: "Discussion on \"Define accessors and mutators.\" | Hashnode"
description: "Discussion on \"Define accessors and mutators.\". Accessor allow you to transform the value of an Eloquent attribute when accessed. Mutator allow you to transform an Eloquent attribute value when it is set"
url: "https://hashnode.com/posts/define-accessors-and-mutators/65a161c9156e4a9b8e4bf35e"
---

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

Discussion

# [Define accessors and mutators.](https://rajamuhammadasher.com/define-accessors-and-mutators?utm_source=hashnode&utm_medium=feed)

Accessor allow you to transform the value of an Eloquent attribute when accessed. Mutator allow you to transform an Eloquent attribute value when it is set

Jul 8, 2023 · 2 min read · rajamuhammadasher.com  
Read the article

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

## Written by

[Raja Muhammad Asher](https://hashnode.com/@rajamuhammadasher)

@rajamuhammadasher · USA

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

Full Stack Developer

Full Stack Developer with a passion for building web applications. PHP, Node.js, Laravel, MySQL, MongoDB. Love collaborating &amp; making a difference

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
