laravel - Can you create a new Model instance without saving it to the database -


i want create whole bunch of instances of model object in laravel, pick optimal instance , save database. know can create instance model::create([]), saves database. if possible i'd create bunch of models, "create" 1 best.

is possible?

i using laravel 5.0

you create new model instantiating it:

$model = new model; 

you can save database @ later stage:

$model->save(); 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -