Closed alirezat66 closed 2 weeks ago
Actually, this is not a bug The data is stored correctly in the database. To get the data you need to use insertGetId, again get the data by the ID with first
Add to version 0.3.2 now you can use the create
method
https://vdart.dev/docs/eloquent-orm/eloquent/#create-and-return-inserted-data
Describe the bug When you insert a data on database, we got nothing `final result = await TaskList().query().insert({ 'title': request.input('title'), 'user_id': Auth().id(), 'created_at': DateTime.now(), 'updated_at': DateTime.now(), 'background_color': request.input('background_color', null), });
then you see:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
{ "message": "Task list created successfully", "data": [] }
Environment (please complete the following information):