I am collecting data from angular with below method.
$result = RepairCategory::select('id','Name')->paginate(10);
the result will be like this
I want to process the data array with some conditions. When I try to store the data in another variable.
$items = $result->data;
Its returning error like
Undefined property: Illuminate\Pagination\LengthAwarePaginator::$data
I tried also
$items = $result['data'];
and
$items = $result[0]->data;
Please suggest a good method to get this...