File: /var/www/html/sarvodayahospital/app/Providers/FooterServiceProvider.php
<?php
namespace App\Providers;
use App\Models\CentreOfExcellence;
use App\Models\Footer;
use App\Models\Hospital;
use App\Models\Speciality;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class FooterServiceProvider extends ServiceProvider
{
public function boot()
{
$footerSpecialities = Speciality::query()
->where('showAtHome', 1)
->where('IsCentreOfExcellence', 1)
->take(15)
->get();
$footerLinks = Footer::query()->first();
$footerHospitals = Hospital::all();
View::share('footerSpecialities', $footerSpecialities);
View::share('footerLinks', $footerLinks);
View::share('footerHospitals', $footerHospitals);
}
}