title: Laravel db:seed always produces error "Object of class DateTime could not be converted to string"
body: <p>Laravel 4.1 seems to drop the Exception "Object of class DateTime could not be converted to string" every time there is something wrong with a db seed.</p>
  
  <p>For instance, suppose I run this seeder:</p>
  
  <pre><code>use Faker\Factory as Faker;
  
  class OrdersTableSeeder extends Seeder {
  
      public function run()
      {
          $f = Faker::create();
  
          foreach(range(1, 10) as $index)
          {
              $c = Customer::leftJoin('orders', function($join) {
                    $join-&gt;on('customers.id', '=', 'orders.customer_id');
                  })
                  -&gt;whereNull('orders.customer_id')
                  -&gt;first();
  
              if (!empty($c)) {
                  Order::create([
                      'amazon_order_id'   =&gt; rand(100, 999) . '-' . rand(1000000, 9999999) . '-' . rand(1000000, 9999999),
                      'customer_id'       =&gt; $c-&gt;id,
                      'total'             =&gt; rand(10, 100) . '.' . rand(1, 99),
                      'subtotal'          =&gt; rand(10, 100) . '.' . rand(1, 99),
                      'first_name'        =&gt; $c-&gt;first_name,
                      'last_name'         =&gt; $c-&gt;last_name,
                      'address1'          =&gt; $c-&gt;address1,
                      'address2'          =&gt; $c-&gt;address2,
                      'address3'          =&gt; $c-&gt;address3,
                      'city'              =&gt; $c-&gt;city,
                      'state'             =&gt; $c-&gt;state,
                      'county'            =&gt; $c-&gt;county,
                      'district'          =&gt; $c-&gt;district,
                      'postal_code'       =&gt; $c-&gt;postalcode,
                      'country'           =&gt; $c-&gt;country,
                      'ship_level'        =&gt; array_rand(['Standard', 'Second', 'Next'], 1),
                      'status'            =&gt; array_rand(['Shipped', 'Unshipped', 'Pending'], 1),
                      'order_date'        =&gt; $f-&gt;dateTime,
                      'notes'             =&gt; array_rand(['', $f-&gt;text(128)], 1)
                  ]);
              }
          }
      }
  
  }
  </code></pre>
  
  <p>This seeder has the following migration <code>up()</code> function:</p>
  
  <pre><code>public function up()
      {
          Schema::create('orders', function(Blueprint $table)
          {
              $table-&gt;increments('id');
              $table-&gt;string('amazon_order_id', 19)-&gt;unique();
              $table-&gt;unsignedInteger('customer_id')-&gt;references('id')-&gt;on('customers');
              $table-&gt;decimal('total', 8, 2)-&gt;index();
              $table-&gt;decimal('subtotal', 8, 2);
              $table-&gt;string('first_name')-&gt;index();
              $table-&gt;string('last_name')-&gt;index();
              $table-&gt;string('address1');
              $table-&gt;string('address2');
              $table-&gt;string('address3');
              $table-&gt;string('city');
              $table-&gt;string('state');
              $table-&gt;string('county');
              $table-&gt;string('district');
              $table-&gt;string('postal_code');
              $table-&gt;string('country', 2);
              $table-&gt;string('ship_level');
              $table-&gt;string('status')-&gt;index();
              $table-&gt;dateTime('order_date')-&gt;index();
              $table-&gt;text('notes');
              $table-&gt;timestamps();
          });
      }
  </code></pre>
  
  <p>Here is the output from <code>php artisan db:seed -vvv</code>:</p>
  
  <pre><code>Exception trace:
   () at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Support\helpers.php:975
   Illuminate\Exception\Handler-&gt;handleError() at n/a:n/a
   preg_replace() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Support\helpers.php:975
   str_replace_array() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\QueryException.php:53
   Illuminate\Database\QueryException-&gt;formatMessage() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\QueryException.php:35
   Illuminate\Database\QueryException-&gt;__construct() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Connection.php:555
   Illuminate\Database\Connection-&gt;run() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Connection.php:338
   Illuminate\Database\Connection-&gt;statement() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Connection.php:295
   Illuminate\Database\Connection-&gt;insert() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Query\Processors\Processor.php:30
   Illuminate\Database\Query\Processors\Processor-&gt;processInsertGetId() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Query\Builder.php:1724
   Illuminate\Database\Query\Builder-&gt;insertGetId() at n/a:n/a
   call_user_func_array() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Builder.php:919
   Illuminate\Database\Eloquent\Builder-&gt;__call() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:1502
   Illuminate\Database\Eloquent\Builder-&gt;insertGetId() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:1502
   Illuminate\Database\Eloquent\Model-&gt;insertAndSetId() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:1472
   Illuminate\Database\Eloquent\Model-&gt;performInsert() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:1383
   Illuminate\Database\Eloquent\Model-&gt;save() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php:459
   Illuminate\Database\Eloquent\Model::create() at C:\Ampps\www\mysite.dev\app\database\seeds\OrdersTableSeeder.php:41
   OrdersTableSeeder-&gt;run() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Seeder.php:37
   Illuminate\Database\Seeder-&gt;call() at C:\Ampps\www\mysite.dev\app\database\seeds\DatabaseSeeder.php:25
   DatabaseSeeder-&gt;run() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Database\Console\SeedCommand.php:52
   Illuminate\Database\Console\SeedCommand-&gt;fire() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Console\Command.php:108
   Illuminate\Console\Command-&gt;execute() at C:\Ampps\www\mysite.dev\vendor\symfony\console\Symfony\Component\Console\Command\Command.php:241
   Symfony\Component\Console\Command\Command-&gt;run() at C:\Ampps\www\mysite.dev\vendor\laravel\framework\src\Illuminate\Console\Command.php:96
   Illuminate\Console\Command-&gt;run() at C:\Ampps\www\mysite.dev\vendor\symfony\console\Symfony\Component\Console\Application.php:892
   Symfony\Component\Console\Application-&gt;doRunCommand() at C:\Ampps\www\mysite.dev\vendor\symfony\console\Symfony\Component\Console\Application.php:191
   Symfony\Component\Console\Application-&gt;doRun() at C:\Ampps\www\mysite.dev\vendor\symfony\console\Symfony\Component\Console\Application.php:121
   Symfony\Component\Console\Application-&gt;run() at C:\Ampps\www\mysite.dev\artisan:59
  </code></pre>
  
  <p>What could be going on here? I can't find anything immediately wrong with it considering I'm not even explicitly adding a DateTime object...other than Faker's dateTime for 'order_date', but that shouldn't be a problem.</p>
  
  <p>Please note, the <code>customers</code> table is already created and seeded 1 step ahead of this one.</p>
  
  <p>Is this a Laravel 4.1 bug?</p>