mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-08 09:26:42 +00:00
794671ef32
Following Laravel guidance and GitHub diff. Not yet in tested state with app-specific changes made.
30 lines
794 B
PHP
30 lines
794 B
PHP
<?php
|
|
|
|
namespace BookStack\App\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.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// 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 (new \BookStack\Util\SvgIcon($expression))->toHtml(); ?>";
|
|
});
|
|
}
|
|
}
|