2023-06-21 09:53:21 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2023-12-10 16:10:32 -05:00
|
|
|
use Illuminate\Pagination\Paginator;
|
|
|
|
use Illuminate\Support\Facades\View;
|
|
|
|
use App\Models\Podcast;
|
2023-06-21 09:53:21 -04:00
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot(): void
|
|
|
|
{
|
2023-12-10 16:10:32 -05:00
|
|
|
Paginator::useBootstrapFive();
|
|
|
|
$publishedPodcasts = Podcast::where('published', true)->select(['name', 'slug'])->get();
|
|
|
|
View::share(['navPodcasts' => $publishedPodcasts]);
|
2023-06-21 09:53:21 -04:00
|
|
|
}
|
|
|
|
}
|