public function getByUser(int $id, int $trackableType = Tracker::TRACKER_ANY, int $perPage = 15) : LengthAwarePaginator
    {
        return $this->getModel()
                    ->newQuery()
                    ->where('user_id', $id)
                    ->where($this->typeClosure($trackableType))
                    ->paginate($perPage);
    }
public function getByUser(int $id, int $trackableType = Tracker::TRACKER_ANY, int $perPage = 15) : LengthAwarePaginator
    {
        return $this->getModel()
                    ->newQuery()
                    ->where('user_id', $id)
                    ->where($this->typeClosure($trackableType))
                    ->paginate($perPage);
    }
public function getByUser ( int $ id , int $ trackableType = Tracker :: TRACKER_ANY , int $ perPage = 15 ) : LengthAwarePaginator { return $ this -> getModel ( ) -> newQuery ( ) -> where ( 'user_id' , $ id ) -> where ( $ this -> typeClosure ( $ trackableType ) ) -> paginate ( $ perPage ) ; }
Get track by user

@param int $id
@param int $trackableType
@param int $perPage
@return \Illuminate\Contracts\Pagination\LengthAwarePaginator
Get track by user