Insert Batch Using Entity Classes |
Hello admin @kenjis, Thank you for your hard work.
I have a little problem, i tried to save several data using the entity class, but it turns out that only the first data is stored. How can I save several data at once, thank you for your attention here sample code: PHP Code: $users = auth()->getProvider();
It seems you misunderstand Entities (or PHP objects).
You created an User entity, and filled chairman's data. The $user object represents chairman. After saving it, you filled admin's data into chairman's object. And you saved it. That means you saved chairman's entity. If you want to use another User entity, create a new User entity with $user = new User(); (05-14-2024, 02:44 AM)kenjis Wrote: It seems you misunderstand Entities (or PHP objects). I think there is a simpler way apart from creating a new entity object. Thanks for quick response. |
Welcome Guest, Not a member yet? Register Sign In |