CodeIgniter, models, and ORM, how to deal with this?

后端 未结 10 834
谎友^
谎友^ 2021-02-03 19:11

I\'m starting with CodeIgniter and after several hours diving in Google I\'m a bit confused.

Let\'s try to explain my question with a easy example: I have a table \'car

10条回答
  •  既然无缘
    2021-02-03 19:48

    I think php-activerecord is a very good drop-in ORM. I've used it with the Slim Framework a few times and I think it would be a great alternative to using CI's native model class. Here is some sample code and the link:

    $post = new Post();
    $post->title = 'My first blog post!!';
    $post->author_id = 5;
    $post->save();
    

    PHP ActiveRecord

提交回复
热议问题