What happens when you try this?
$model = Model::create([
'foo' => 'bar',
// ...etc...
]);
dd($model);
object(User)#168 (21) { ["primaryKey":protected]=> string(2) "PK" ["dates":protected]=> array(1) { [0]=> string(10) "deleted_at" } ["fillable":protected]=> array(3) { [0]=> string(12) "CREATE_KEY" [1]=> string(12) "CREATED_BY" [2]=> string(12) "UPDATED_BY" } ["hidden":protected]=> array(2) { [0]=> string(8) "password" [1]=> string(14) "remember_token" } ["connection":protected]=> NULL ["table":protected]=> string(6) "user" ["perPage":protected]=> int(15) ["incrementing"]=> bool(true) ["timestamps"]=> bool(true) ["attributes":protected]=> array(3) { ["UPDATED"]=> string(19) "2014-09-07 11:37:06" ["CREATED"]=> string(19) "2014-09-07 11:37:06" ["PK"]=> int(14) } ["original":protected]=> array(3) { ["UPDATED"]=> string(19) "2014-09-07 11:37:06" ["CREATED"]=> string(19) "2014-09-07 11:37:06" ["PK"]=> int(14) } ["relations":protected]=> array(0) { } ["visible":protected]=> array(0) { } ["appends":protected]=> array(0) { } ["guarded":protected]=> array(1) { [0]=> string(1) "*" } ["touches":protected]=> array(0) { } ["observables":protected]=> array(0) { } ["with":protected]=> array(0) { } ["morphClass":protected]=> NULL ["exists"]=> bool(true) ["forceDeleting":protected]=> bool(false) }
Would be really grateful if the source of the problem can be found...
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community