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
Create posts with tag and cover image #410
Comments
I have the same question. I dont know how to insert new post with Corcel, I want to use posts table with other purpose. I think this is a new function in a future, I can not find this in code. |
@mafiadek @namnguyen2091 thanks for sharing! actually, Corcel works on the top of Laravel's Eloquent ORM, so you can use all the relations the it should work fine when inserting, I cannot see any other restriction, but if so just let me know here and we try to fix that asap. basically you are going to use the $post = Post::create([/* args */);
$post->taxonomies()->create(/* args */); WP database uses 4 tables to do that, so you should touch all the necessary relations. you're going to use it would be nice to have something like let me know any other thoughts! you're welcome! 😎💪🎉 |
@mafiadek @namnguyen2091 just created a |
I see. Thanks so much! |
Description:
how to create new post with tag and category and set cover image
Steps To Reproduce:
The text was updated successfully, but these errors were encountered: