Skip to content

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

Description

@richardalain83

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions