Файловый менеджер - Редактировать - /home/clickysoft/public_html/calvary-p2.clickysoft.net/app/Providers/AppServiceProvider.php
Назад
<?php namespace App\Providers; use App\Models\Page; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Register any application services. */ public function register(): void { // } /** * Bootstrap any application services. */ public function boot(): void { View::composer('*', function ($view) { $routeName = Route::currentRouteName(); // Variables for feedback form route if ($routeName === 'feedback.form') { $feedbackForm = Page::first(); $feedbackForm = json_decode($feedbackForm->content); $view->with('feedbackForm', $feedbackForm); } // Variables for homepage route if ($routeName === 'home') { $sectionOne = Page::where('id', 3)->first(); $sectionOne = json_decode($sectionOne->content); $sectionTwo = Page::where('id', 4)->first(); $sectionTwo = json_decode($sectionTwo->content); $sectionThree = Page::where('id', 5)->first(); $sectionThree = json_decode($sectionThree->content); $sectionFour = Page::where('id', 6)->first(); $sectionFour = json_decode($sectionFour->content); $sectionFive = Page::where('id', 7)->first(); $sectionFive = json_decode($sectionFive->content); $sectionSix = Page::where('id', 8)->first(); $sectionSix = json_decode($sectionSix->content); $sectionSeven = Page::where('id', 9)->first(); $sectionSeven = json_decode($sectionSeven->content); $view->with('sectionOne', $sectionOne); $view->with('sectionTwo', $sectionTwo); $view->with('sectionThree', $sectionThree); $view->with('sectionFour', $sectionFour); $view->with('sectionFive', $sectionFive); $view->with('sectionSix', $sectionSix); $view->with('sectionSeven', $sectionSeven); } }); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка