Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use corcel in WordPress plugin for custom tables #611

Open
developerpaddy opened this issue Jun 27, 2022 · 0 comments
Open

How to use corcel in WordPress plugin for custom tables #611

developerpaddy opened this issue Jun 27, 2022 · 0 comments

Comments

@developerpaddy
Copy link

  • Corcel Version: recent
  • Framework Name & Version:
  • PHP Version: 7.4.*
  • Database Driver & Version:

Description:

Hello friends,

Thanks for the great work.
I have used corcel in php but I want to use in WordPress.
I am very happy that I can use eloquent in WordPress.

I know same question has been asked previously, but some where my requirements are different.
#101

I want to use corcel in my WordPress plugin so that I can use custom table to save my plugin related data and use all the ORM to work with my data. I found corcel is useful in my case.

I tried but I am having an issue while initializing the database. I used DB_NAME, DB_PASSWORD constants from wp_config.php file but got PDO_EXCEPTION error cannot connect to database.

I think if I connect to database then it will be easy to setup cocel in WordPress plugin. Any example would be much appreciated.

Steps To Reproduce:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant