2

Why is the prettus repository package shit at handling mass inserts. The documentation says:

$this->repository->create(Input::all())

WTF does that even mean.

Comments
  • 0
    Make sure that you have $fillable property in model that your repository inherits

    that is the first the comes in my mind, can you describe you problem further?

    i think if you didn't override create() method in your repository or model it will do the same as eloquents create()

    https://laravel.com/docs/5.8/...
  • 0
    I’ve got the field that’s retiring out in the table, but the error coming back is coming back as “join_id does not have a default value” but going through the array of rows to insert, it’s got a value assigned to it.

    I’ve not overwritten the create method, but going through the model works. I don’t want to do that as it’s bypassing the cache
  • 0
    damn, that is inconsistent, you can try with laravel telescope, and see exact query that is going on, see if you have "join_id" in insert query...
    you were right, if Model::create(Input::all()) works but this doesn't it's definitively problem with packages mass assignment
Add Comment