protected function getTotalChunksFromRequest(Request $request)
    {
        if (!$request->get(static::KEY_CHUNK_SIZE)) {
            return 0;
        }

        return intval(
            ceil($request->get(static::KEY_TOTAL_SIZE) / $request->get(static::KEY_CHUNK_SIZE))
        );
    }
protected function getTotalChunksFromRequest(Request $request)
    {
        if (!$request->get(static::KEY_CHUNK_SIZE)) {
            return 0;
        }

        return intval(
            ceil($request->get(static::KEY_TOTAL_SIZE) / $request->get(static::KEY_CHUNK_SIZE))
        );
    }
protected function getTotalChunksFromRequest ( Request $ request ) { if ( ! $ request -> get ( static :: KEY_CHUNK_SIZE ) ) { return 0 ; } return intval ( ceil ( $ request -> get ( static :: KEY_TOTAL_SIZE ) / $ request -> get ( static :: KEY_CHUNK_SIZE ) ) ) ; }
Returns current chunk from the request.

@param Request $request

@return int
Returns current chunk from the request .