title: Make First Letter of an Array Uppercase in Laravel
body: <p>I'm trying to retrieve strings from my database using Laravel Eloquent queries. However, the data I get is in full caps. I want only the first letter to be in uppercase. Can anybody help me out?</p>
  
  <pre class="lang-php prettyprint-override"><code>$main = DB::table('master_accountsmain')-&gt;get()
  </code></pre>
  
  <p>I'm passing the main to my views using...</p>
  
  <pre><code>return view('home', 'main' =&gt; $main);
  </code></pre>
  
  <p>I have tried using <code>ucfirst($main),</code> but it does not work. The data remains in uppercase. </p>