39 lines
676 B
PHP
39 lines
676 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Province;
|
|
use Illuminate\Pagination\Paginator;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* RegisterController any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Paginator::useBootstrapFive();
|
|
|
|
\Illuminate\Support\Facades\View::composer('layouts.hero', function ($view) {
|
|
|
|
|
|
$provinces = Province::orderBy('name')->get();
|
|
|
|
$view->with('provinces', $provinces);
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
}
|