public function paginate($perPage = null, $page = 1)
    {
        $this->paginated(true);

        $this->perPage = $perPage ?: $this->perPage;
        $this->page    = $page;

        return $this;
    }
public function paginate($perPage = null, $page = 1)
    {
        $this->paginated(true);

        $this->perPage = $perPage ?: $this->perPage;
        $this->page    = $page;

        return $this;
    }
public function paginate ( $ perPage = null , $ page = 1 ) { $ this -> paginated ( true ) ; $ this -> perPage = $ perPage ? : $ this -> perPage ; $ this -> page = $ page ; return $ this ; }
Set per page and page parameters.

@param  int  $perPage
@param  int $page
@return $this
Set per page and page parameters .