mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-27 20:51:57 +00:00
![Dan Brown](/assets/img/avatar_default.png)
Removed old pagination provider as url handling now achieved in a better way. Removed unused broadcast service provider. Moved view-based tweaks into specific provider. Reorganised provider config list.
32 lines
776 B
PHP
32 lines
776 B
PHP
<?php
|
|
|
|
namespace BookStack\Providers;
|
|
|
|
use BookStack\Entities\BreadcrumbsViewComposer;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\Facades\Blade;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ViewTweaksServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
// Set paginator to use bootstrap-style pagination
|
|
Paginator::useBootstrap();
|
|
|
|
// View Composers
|
|
View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class);
|
|
|
|
// Custom blade view directives
|
|
Blade::directive('icon', function ($expression) {
|
|
return "<?php echo icon($expression); ?>";
|
|
});
|
|
}
|
|
}
|