Laravel vs Symfony | Model Attributes

I’m actually discovering Laravel (I’ve used symfony for years) and I face a situation where I don’t know if I just couldn’t find the right information or it is just the way to do in Laravel.

When creating a model in Symfony you put attributes in your model class. Actually these attributes represent the different collumns of your table for the ORM.

Now in Laravel I see all people don’t put theses attributes in the model class but in the migrations files. So a new developer who should contribute in a new project will have to look on database or migrations files. Which in my opinion is not the rule of an ORM : “let dev think class and not table

Could somebody, please, put a ligth on this point?

Thanks

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *