[Vuejs]-Method Illuminate\Database\Eloquent\Collection::paginate does not exist."

0👍

I solved it instead of this.employees = response.data; it should be this.employees = response.data.data;

methods: {
    getEmployeesbyCompany: function() {
      axios
        .get("api/getEmployees", {
          params: { company_id: this.form.company_id }
        })
        .then(
          function(response) {
            this.employees = response.data.data;
          }.bind(this)
        );
    },

    getResults(page = 1) {
      axios.get("api/employee?page=" + page).then(response => {
        this.employees = response.data;
      });
      axios
        .get("api/getEmployees?page=" + page, {
          params: { company_id: this.form.company_id }
        })
        .then(
          function(response) {
            this.employees = response.data.data;
          }.bind(this)
        );
    },

Leave a comment