I want only use created_at , how to do it?
I know:
This can custom timestamps name
const CREATED_AT = \'created\'; const UPDATED_AT = \'updat
My solution for this is using a new __construct method.
__construct
See:
class MyModel extends Eloquent { public $timestamps = false; public function __construct(array $attributes = []) { parent::__construct($attributes); $this->attributes['created_at'] = $this->freshTimestamp(); } }