Refactor navigation settings across multiple pages: update navigation groups and labels for HomePageSettings, ManageCtaSettings, ManagePortfolio, ManageSolutions, ManageSuccess, and ManageSite. Introduce solutions data fetching in OurSolutionPageController and enhance header navigation with dynamic solutions list. Update database migration to include new fields for solutions.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\Solution;
|
||||
use App\Settings\SiteSettings;
|
||||
use App\Settings\SiteSocialSettings;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -27,6 +28,7 @@ class AppServiceProvider extends ServiceProvider
|
||||
Model::unguard();
|
||||
|
||||
$this->addSettingsToViews();
|
||||
$this->addSolutionsToViews();
|
||||
|
||||
// logDB();
|
||||
}
|
||||
@@ -41,4 +43,14 @@ class AppServiceProvider extends ServiceProvider
|
||||
$view->with('socialMedia', app(SiteSocialSettings::class));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add solutions to views
|
||||
*/
|
||||
public function addSolutionsToViews(): void
|
||||
{
|
||||
ViewFacade::composer(['web.layouts.navigation.header'], function (View $view) {
|
||||
$view->with('solutions', Solution::query()->latest()->get());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user