30 lines
584 B
PHP
30 lines
584 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
use App\Models\Admin\latest_update;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Fetch the latest update data
|
|
$show_update = latest_update::all()->toArray();
|
|
|
|
// Share the $update variable with all views
|
|
view()->share('update', $show_update);
|
|
}
|
|
}
|