Should I put file handling in Model? -


mvc fws ships base models, implements ar/orm. first what's comes mind should used data manipulations only. have created image model represents file attributes, basename, extension, etc.

for example, request provides me tmp file, need next create image that. because clear, model cannot represent without file, how creation of model structured? valid approach put file moving/styling logic inside of model? or, handle else , create model file value object?

i using laravel php


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -