Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RedBean simple model

I've been told to use some ORM library to make storage easier. I've read about Doctrine, RedBeans and some other ones. I'm giving RedBeans a try because it's quite simple and requires no configuration. I already tried some basic code to store beans and so.

If I want to have a model class (a bean?), to add some basic behaviour and functions. What class do I need to extend? What methods do I need to override and then how should I get an instance of them?

Example: a Blog class which contains a User and Posts

like image 837
Riskz Avatar asked Aug 07 '26 00:08

Riskz


1 Answers

The answer to my question was a feature of RedBean called 'Fuse'. It was as simple as extending RedBean_SimpleModel class and implementing delete and update methods. The downside of RedBean is the lack of tutorials/documentations (their wiki is really poor)

like image 200
Riskz Avatar answered Aug 08 '26 16:08

Riskz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!