---
title: "Comment by Favour Okunowo on \"Laravel Eloquent Tutorial - Get only the fields (aka columns) we need from relation.\" | Hashnode"
description: "Nice article. Tried this but I kept on getting the field name as the value. Something like &quot;firstname&quot; =&gt; &quot;&#39;firstname&#39;&quot;"
url: "https://hashnode.com/posts/laravel-eloquent-tutorial-get-only-the-fields-aka-columns-we-need-from-relation/6211887ac6ed3906e81c361e/comment/624572a5114d74ee1e6336d0"
---

[Discussion](https://hashnode.com/posts/laravel-eloquent-tutorial-get-only-the-fields-aka-columns-we-need-from-relation/6211887ac6ed3906e81c361e)

Comment [Laravel Eloquent Tutorial - Get only the fields (aka columns) we need from relation.](https://hashnode.com/posts/laravel-eloquent-tutorial-get-only-the-fields-aka-columns-we-need-from-relation/6211887ac6ed3906e81c361e)

[Favour Okunowo](https://hashnode.com/@nowodev)

[Mar 31, 2022](https://hashnode.com/posts/laravel-eloquent-tutorial-get-only-the-fields-aka-columns-we-need-from-relation/6211887ac6ed3906e81c361e/comment/624572a5114d74ee1e6336d0)

Nice article. Tried this but I kept on getting the field name as the value.

Something like "firstname" => "'firstname'"
