30 lines
571 B
PHP
30 lines
571 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
use App\Models\TahunAjaran;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
|
|
public function boot()
|
|
{
|
|
View::composer('*', function ($view) {
|
|
$tahunAktif = TahunAjaran::where('status', 'aktif')->first();
|
|
$view->with('tahunAktif', $tahunAktif);
|
|
});
|
|
}
|
|
}
|