Laravel search with pagination and resource collection
How can I search a model and perform where clause of the collection without limiting to the pagination return [ 'data' => $this->collection, 'all' => $this->total(), 'tcases' => $this->whereIn('c_t', [1,2,3,4,5,6,7,8,9,10,11])->count(), 'tsc' => $this->where('c_t', 1)->count(), 'tca' => $this->where('c_t', 2)->count(), 'thc' => $this->where('c_t', 3)->count(), 'tchraj' => $this->where('c_t', 4)->count(), 'tnmc' => $this->where('c_t', 5)->count(), 'tnlc' => $this->where('c_t', 6)->count(), 'tect' => $this->where('c_t', 7)->count(), 'twaca' => $this->where('c_t', 8)->count(), 'tflr' => $this->where('c_t', 9)->count(), 'tfclc' => $this->where('c_t', 10)->count(), 'twalr' => $this->where('c_t', 11)->count(), ]; This is only limiting to the 15 value i provided for the paginate
Please or to participate in this conversation.