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

Unable to insert new row if table is empty (fix included) #5

Open
richardalain83 opened this issue Oct 10, 2016 · 0 comments
Open

Unable to insert new row if table is empty (fix included) #5

richardalain83 opened this issue Oct 10, 2016 · 0 comments

Comments

@richardalain83
Copy link

Hi,
I'm using Laravel 5.2 and I was unable to insert row if the table of my model was empty.

I found the fix in DatatablesEditor.php
line 84 replace inside else statement: $model = $model::all(); by $model = new $model;
and line 88: $model[0]->create($input['data'][$rowFirstId]); by $model->create($input['data'][$rowFirstId]);

I

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