Code First Entity Framework Model In PHP
I am recently working in a ASP.Net MVC project where we use code first technique to create all the database table. I really liked the idea, where you don't need to touch the database and create the model classes which are automatically mapped to the database by the EF layer.
I am planning to start a hobby project with PHP and was playing with Laravel (I am newbie in PHP). I was wondering if there is any equivalent framework in PHP that support code first pattern as EF 4.1?
I was looking into some Laravel tutorial, it looks like the ORM (eloquent) doesn't work exactly same way as the EF 4.1 in .net does. I seems to me that you still need to create the table in the database and then you create a model to map the database. Am I missing something?
For PHP i suggest looking at Doctrine 2 as ORM. You define your Entities and doctrine will generate the classes and database structure for you.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?