Define Active Record Implementation. How to use it Laravel ?

Active Record Implementation is an architectural pattern found in software engineering that stores in-memory object data in relational databases. Active Record facilitates the creation and use of business objects whose data is required to persistent in the database. Laravel implements Active Records by Eloquent ORM. Below is sample usage of Active Records Implementation is Laravel.

$product = new Product;
$product->title = 'Iphone 6s';

Active Record style ORMs map an object to a database row. In the above example, we would be mapping the Product object to a row in the products table of database.

Leave a Reply

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