|
@@ -37,13 +37,30 @@ class Message extends Model
|
|
|
/**
|
|
/**
|
|
|
* Indicates if the model should be timestamped.
|
|
* Indicates if the model should be timestamped.
|
|
|
*
|
|
*
|
|
|
- * The `message` table only has a `created_at` column (no `updated_at`),
|
|
|
|
|
- * and it is maintained by the database, so we disable Eloquent's
|
|
|
|
|
- * automatic timestamps.
|
|
|
|
|
|
|
+ * The `message` table only has a `created_at` column (no `updated_at`).
|
|
|
|
|
+ * We let Eloquent manage `created_at` automatically and disable the
|
|
|
|
|
+ * `updated_at` timestamp via CREATED_AT / UPDATED_AT constants below.
|
|
|
*
|
|
*
|
|
|
* @var bool
|
|
* @var bool
|
|
|
*/
|
|
*/
|
|
|
- public $timestamps = false;
|
|
|
|
|
|
|
+ public $timestamps = true;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The name of the "created at" column.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @var string|null
|
|
|
|
|
+ */
|
|
|
|
|
+ const CREATED_AT = 'created_at';
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The name of the "updated at" column.
|
|
|
|
|
+ *
|
|
|
|
|
+ * The `message` table has no `updated_at` column, so set it to null to
|
|
|
|
|
+ * prevent Eloquent from trying to write it.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @var string|null
|
|
|
|
|
+ */
|
|
|
|
|
+ const UPDATED_AT = null;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* The attributes that are mass assignable.
|
|
* The attributes that are mass assignable.
|
|
@@ -52,7 +69,7 @@ class Message extends Model
|
|
|
*/
|
|
*/
|
|
|
protected $fillable = [
|
|
protected $fillable = [
|
|
|
'name',
|
|
'name',
|
|
|
- 'Email',
|
|
|
|
|
|
|
+ 'email',
|
|
|
'number',
|
|
'number',
|
|
|
'message',
|
|
'message',
|
|
|
'country',
|
|
'country',
|