TIF_NGANJUK_E41220949/app/Providers/AppServiceProvider.php

31 lines
636 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View; // wajib
use App\Models\KategoriTps; // wajib
use Illuminate\Pagination\Paginator;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
Paginator::useBootstrap();
View::composer('user.template', function ($view) {
$view->with('kategoriTps', KategoriTps::all());
});
}
}