Collection of general and bootstrap specific view helpers for use in Laravel blade files
A Collection of general and bootstrap specific view helpers.
A growing collection of Bootstrap 4 based and general view helpers that I use across my Laravel projects, some of them may be useful to you, full details of each view helper is below.
The easiest way to include these view helpers is via
composer, simply execute
composer require deanblackborough/laravel-view-helpers in your
terminal/console of choice.
After automatic discovery you can publish the view files with
As it is unlikely your needs will exactly match mine it is recommended you
publish the view files and then tweak them in
A simple pagination view helper, next and previous buttons, current status, first to last and a select menu with paging limits.
@include( 'laravel-view-helpers::pagination', [ 'offset' => 0, // Current offset [integer] 'total' => 1000, // Totoal number of items [integer] 'limit' => 50, // Current limit [integer] 'limit_options' => [50, 100, 250, ...], // Limit options [array] 'uri' => [ 'base' => '/path/to/current/page', // Base uri [string] 'parameters' => ['param1'=>'value1', ...], // Current GET parameters to add to uris [array] 'anchor' => '#section-to-jump-to', // Optional named anchor [string|null] ], 'count_prefix' => 'Expenses', // Optional prefex for from:to [string|null] 'css_classes' => [ 'left' => ' col-9 col-sm-10 col-xl-11', // Class for left container [string|null] 'right' => ' col-3 col-sm-2 col-xl-1', // Classes for right container [string|null] ] ] )