I think the name says it: I want to use ISO 8601 with time zones as the default DateTime-Format in Laravels Eloquent. I got it
class mEloquent extends Eloquent {
protected function getDateFormat()
{
return 'YYYY-MM-DDThh:mm:ss.sTZD';
}
}
All my models will expand. But how do I build tables? Simply
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('firstName');
$table->string('lastName');
$table->string('email')->unique();
$table->string('password');
$table->timestamps();
});
} ......
normally? How can I compare this date format? Or shoud I just use the default and keep the timezone separate?
custi source
share