The illegal offset type shows this error when
protected $primaryKey = ['user_id'];
public $incrementing = false;
CodePudding user response:
The primaryKey
takes a string not array
all you need is to change it to string
protected $primaryKey = 'user_id';