title: Blade view not printing data from array
body: <p>I've got a simple enough array of user information I'm trying to print. </p>
  
  <p>I can send the information to the view fine. And a command like:</p>
  
  <p>{{ $who->name }} will give me the name. </p>
  
  <p>However when I do a foreach loop to print all the data in the array I get a bunch of numbers. 1 1 1 and blank spaces.  </p>
  
  <pre><code>  @foreach ($who as $val)
  
            {{ $val }}
  
       @endforeach
  </code></pre>
  
  <p>What's going on? </p>
  
  <p>Also, as the array has the titles of each value: ie "Name": "John Doe", is there a way to print the titles separately?</p>
  
  <p>This is the controller:</p>
  
  <pre><code> public function show(UserEdit $object) {
         return view('UserEdit', compact('object'));
     }
  </code></pre>
  
  <p>Note the controller is loading the model UserEdit, which has the user's data, and the id is generated from the route. Which I've confirmed works.</p>
  
  <p>Edit: Updating files: </p>
  
  <p>UserEdit.blade: </p>
  
  <pre><code>@extends('layout')
  
  
  @section('content')
      &lt;h1&gt;User Profile Data {{ $object-&gt;First_Name }} {{ $object-&gt;Last_Name }}&lt;/h1&gt;
          &lt;br&gt;&lt;br&gt;
  
               @foreach ($object as $key=&gt;$value)
                   {{ $key }}  {{ $value }}
               @endforeach
  
  
  @stop
  </code></pre>
  
  <p>Gives error: Trying to get property of non-object</p>
  
  <p>UserEntryController:
      
  
  <pre><code>namespace App\Http\Controllers;
  use App\UserEdit;
  use Illuminate\Http\Request;
  use DB;
  use App\Http\Requests;
  
  class UserEntryController extends Controller
  {
     public function index(){
         $columns = DB::getSchemaBuilder()-&gt;getColumnListing('users');
         $profile = UserEdit::all()-&gt;where('ID', '530');
         return view('UserEntry', compact('profile', 'columns'));
     }
  
     public function show(UserEdit $object) {
         //$columns = DB::getSchemaBuilder()-&gt;getColumnListing('users');
        // $profile = UserEdit::all()-&gt;where('ID', '530');
        // $who = UserEdit::find($ID);
         $object = $object-&gt;toArray();
         return view('UserEdit', compact('object'));
         //return $object;
     }
  
  }
  </code></pre>
  
  <p>Routes: </p>
  
  <pre><code>&lt;?php
  
  /*
  |--------------------------------------------------------------------------
  | Web Routes
  |--------------------------------------------------------------------------
  |
  | This file is where you may define all of the routes that are handled
  | by your application. Just tell Laravel the URIs it should respond
  | to using a Closure or controller method. Build something great!
  |
  */
  
  Route::get('/', function () {
      return view('welcome');
  });
  
  Auth::routes();
  
  Route::get('/home', 'HomeController@index');
  
  Route::get('DB', 'DBController@index');
              //$tables = DB::select('SHOW TABLES');
              //$titles = DB::select("SELECT * FROM topneeds(Name, Abbrev, jobtitle, region, detail)");
  
              //return view('DB', compact('titles'));
  Route::get('Sort', 'SortController@index');
  Route::get('User', 'UserEntryController@index');
  route::get('User/{object}', 'UserEntryController@show');
  </code></pre>
  
  <p>UserEdit:</p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  
  class UserEdit extends Model  {
  
  
  
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'users';
  
      /**
       * Attributes that should be mass-assignable.
       *
       * @var array
       */
      protected $fillable = ['ID', &lt;--67 values--&gt;, 'remember_token'];
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = [];
  
      /**
       * The attributes that should be casted to native types.
       *
       * @var array
       */
      protected $casts = [];
  
      /**
       * The attributes that should be mutated to dates.
       *
       * @var array
       */
      protected $dates = [];
  
  }
  </code></pre>