PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, April 14, 2022

[FIXED] How to create doctrine model entities from db without symfony?

 April 14, 2022     database, doctrine, migration, model, php     No comments   

Issue

I want to add doctrine framework to my custom php project. How can I create model entities by db tables with doctrine.


Solution

What doctrine version are you using? With the latest version you can use this after install doctrine in your project:

php bin/console doctrine:mapping:import "App\Entity" annotation --path=src/Entity

You must change the directory and the type (annotation, xml, yml), and you must have configured the connection to the database where the tables are.



Answered By - MR Mark II
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing