Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 1 year ago.
0

What happens when you try this?


$model = Model::create([
  'foo' => 'bar',
  
  // ...etc...
]);

dd($model);

Last updated 1 year ago.
0
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) }
Last updated 1 year ago.
0

Would be really grateful if the source of the problem can be found...

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.