2017 © Pedro Peláez
 

library laravel-pagination

Pagination helper library for Laravel

image

oval/laravel-pagination

Pagination helper library for Laravel

  • Tuesday, January 13, 2015
  • by jamestrusleroval
  • Repository
  • 0 Watchers
  • 1 Stars
  • 342 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 7 % Grown

The README.md

PHP_Laravel_Pagination

Include our library using the composer name: oval/laravel-pagination, (*1)

View:, (*2)

$Model->items was passed from our controller and contains the response from the database(see model), (*3)

<?=$Model->items->appends( Input::except('page') )->links();?>

Controller:, (*4)

Here is an example of a controller method, (*5)

public function Test()
{

    $paginationViewModel = new PaginationViewModel();
    $paginationModel = new PaginationModel();

    $paginationModel->amount = 50;
    $paginationModel->columns[ "projectTitle" ] = new PaginationColumn( "project_title", Input::get( "projectTitle" ), Input::get('projectTitleSort') );
    $paginationModel->columns[ "partners" ] = new PaginationColumn( "partners", Input::get( "partners" ), Input::get('partnersSort') );        
    $paginationModel->page = isset( $_GET[ "page" ] ) ? $_GET[ "page" ] : 0;

    $paginationViewModel->paginationModel = $paginationModel;
    $paginationViewModel->items = $this->yourRepository->GetWithPagination( $paginationModel );

    return View::make('whatever/test', array( "Model" => $paginationViewModel ) );

}

Model:, (*6)

This is the GetWithPagination method we set up in our "yourRepository", (*7)

public function GetWithPagination( PaginationModel $paginationModel )
{
    $query = DB::table('tablename');   
    $whatevers = $query->paginate( PaginationHelper::PrepareForDb( $query, $paginationModel ) );
    return $whatevers;
}

The Versions

13/01 2015

dev-master

9999999-dev https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

13/01 2015

v1.4.5

1.4.5.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

09/01 2015

1.4.4

1.4.4.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

09/01 2015

v1.4.3

1.4.3.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

09/01 2015

v1.4.2

1.4.2.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

10/11 2014

v1.4.1

1.4.1.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

10/11 2014

v1.4

1.4.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

10/11 2014

v1.3

1.3.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

10/11 2014

v1.2

1.2.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

10/10 2014

v1.1

1.1.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination

27/08 2014

v1.0

1.0.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Pagination

Pagination helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel pagination