Posts

Showing posts from May, 2016

Laravel 5.2 Eloquent Insert Row or Add Record

Introduction to Eloquent Most of applications code is based on Object Oriented Design but the database contains tables and relations and return set of rows instead list of objects. So there is inhereit mismatch between application code and database artifacts. Different Lanaugage provide object relational mapping (ORM) technologies that fill this mismatch gap. Eloquent is ORM that is used by Laravel. Eloquent is used to interact with the database to perform select, insert, update and other database operations. We create model calsses corresponding to every table. Each Model class help in performaing database related operations with associate table. You must know what are migrations and how setup database for Laravel applications to proceed further. Create Model Class By default the model classes are located in 'App' folder. If you see you Laravel application's App folder you will see a User.php file, its already created model class by Laravel. Migration for users table are a