本文整理匯總了PHP中Illuminate\Pagination\Paginator::presenter方法的典型用法代碼示例。如果您正苦於以下問題:PHP Paginator::presenter方法的具體用法?PHP Paginator::presenter怎麽用?PHP Paginator::presenter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Pagination\Paginator
的用法示例。
在下文中一共展示了Paginator::presenter方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: boot
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
// 創建 Xunsearch XS_APP_ROOT 常量
define('XS_APP_ROOT', app_path('Inspirer/Xunsearch'));
// 使用自定義分頁模板
Paginator::presenter(function (AbstractPaginator $paginator) {
return new PaginationPresenter($paginator);
});
}
示例2: register
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(__DIR__ . '/../config/tabulator.php', 'tabulator');
if (config('tabulator.css-framework') == 'foundation') {
Paginator::presenter(function ($paginator) {
return new FoundationPresenter($paginator);
});
}
}
示例3: boot
/**
* Register bindings in the container.
*
* @return void
*/
public function boot()
{
if ($this->app->environment('local')) {
$this->app->register('Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider');
$this->app->register('Barryvdh\\Debugbar\\ServiceProvider');
}
$dsn = config('services.raven.dsn');
if (!empty($dsn)) {
$this->app->register('Jenssegers\\Raven\\RavenServiceProvider');
}
$locale = config('app.locale');
Carbon::setLocale($locale);
Paginator::presenter(function ($paginator) {
return new BootstrapFourPresenter($paginator);
});
}