title: How to only get the first 10 characters from a database field when querying with Eloquent Relationships?
body: <p>The situation: In the User's Profile, I am fetching all of the user's posts. </p>
  
  <p>A post consists of a database field called "body" which is like the text in a blog article.</p>
  
  <p>I only want to get the first 10 characters of the "body". Currently the code below gets the entire body which will be wasteful because I only need the first 10 characters. </p>
  
  <pre><code>public function show(User $user) 
  {
      // This fetches all of the user's posts. Also it gets the entire body, which I don't want. I only want 10 characters from the "body".
      $posts = $user-&gt;posts;
  
      return view('users.user', compact('user', 'posts'));
  }
  </code></pre>