title: eloquent first method return collection with model variables
body: <p>Hi i've created a model which is :</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Database\Eloquent\SoftDeletes;
  use Illuminate\Database\Eloquent\SoftDeletingTrait;
  use Illuminate\Support\Facades\Schema;
  
  class leads extends Model
  {
  use SoftDeletes;
  protected $connection = 'mysql';
  protected $dates = ['deleted_at'];
  protected $table = 'tableName_name';
  public $timestamps = false;
  protected $guarded = [];
  }
  ?&gt;
  </code></pre>
  
  <p>and the controller look like this :</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\leads;
  use DB;
  
  class billingController extends Controller
  {
      public $lead;
      public function __construct(leads $lead) {
          $this-&gt;Date = date("Y-m-d H:i:s");
          $this-&gt;date = date("Y-m-d");
          $this-&gt;lead = $lead;
      }
  
      public function GetInfo($user) {
          $GetUserInfo = $this-&gt;lead-&gt;select('*')-&gt;where('ID', $user)-&gt;first();
          if(empty($GetUserInfo)) return false;
          else return $GetUserInfo-&gt;userInfo;
      }
  }
  </code></pre>
  
  <p>supposed i want userInfo</p>
  
  <p>when i echo GetInfo it return a string with curly brackets not an object as mentioned in laravel documentation first should return an object (std class) but if i print_r(GetInfo) i got something like this :</p>
  
  <blockquote>
    <p>App\Leads Object ( [connection:protected] => mysql [table:protected]
    => tableName_name [dates:protected] => Array ( [0] => deleted_at ) [timestamps] => [guarded:protected] => Array ( )
    [primaryKey:protected] => id [keyType:protected] => int [incrementing]
    => 1 [with:protected] => Array ( ) [withCount:protected] => Array ( ) [perPage:protected] => 15 [exists] => 1 [wasRecentlyCreated] =>
    [attributes:protected] => Array ( [ID] => 19 [userInfo] => 29........</p>
  </blockquote>
  
  <p>is there anything i'm doing wrong ? It's supposed to return needed values as std class object what i have to change ?</p>