HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/zelfverkopen.komma.pro/app/Providers/ComposerServiceProvider.php
<?php
/**
 * Created by PhpStorm.
 * User: mike
 * Date: 19/05/17
 * Time: 08:41
 */

namespace App\Providers;


use App\KommaApp\Colleagues\ColleagueComposer;
use App\KommaApp\FeedbackCompany\ScoreComposer;
use App\KommaApp\Posts\LatestPostsComposer;
use App\KommaApp\PostCategories\PostCategoriesComposer;
use App\KommaApp\Posts\PostComposer;
use App\KommaApp\Products\ProductBuyHouseComposer;
use App\KommaApp\Products\ProductComposer;
use App\KommaApp\QuestionCategories\QuestionCategoriesComposer;
use App\KommaApp\Questions\BuyHouseComposer;
use App\KommaApp\Questions\HowItWorksComposer;
use App\KommaApp\Services\ServiceComposer;
use App\KommaApp\Tips\TipsComposer;
use App\KommaApp\Vacancies\VacanciesComposer;
use App\KommaApp\Properties\PropertiesRowComposer;
use App\KommaApp\Properties\PropertiesSoldComposer;
use App\KommaApp\Questions\QuestionComposer;
use App\KommaApp\References\ReferenceComposer;
use Carbon\Carbon;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Contracts\View\View;

class ComposerServiceProvider extends ServiceProvider
{
    /**
     * Register bindings in the container.
     *
     * @return void
     */
    public function boot()
    {
        // Using class based composers...
//        view()->composer('site.pages.about', TeamMemberComposer::class);
        view()->composer(['site.partials.footer', 'site.partials.postsRow', 'site.partials.posts.mostRecentPosts'], LatestPostsComposer::class);
        view()->composer(['site.partials.posts.categoryFiltersRow'], PostCategoriesComposer::class);
        view()->composer(['site.partials.about.teamRow'], ColleagueComposer::class);
        view()->composer(['site.pages.faq'], QuestionComposer::class);
        view()->composer(['site.partials.howItWorks.process'], HowItWorksComposer::class);
        view()->composer(['site.partials.buyHouse.process'], BuyHouseComposer::class);
        view()->composer(['site.partials.referencesRow'], ReferenceComposer::class);
        view()->composer(['site.partials.whatDoesItCost.services'], ServiceComposer::class);
        view()->composer(['site.partials.home.propertiesRow'], PropertiesRowComposer::class);
        view()->composer(['site.partials.vacanciesButton', 'site.pages.vacancies.index'], VacanciesComposer::class);
        view()->composer(['site.partials.extraServices.servicesRow'], ProductComposer::class);
        view()->composer(['site.forms.buyHouse'], ProductBuyHouseComposer::class);
        view()->composer(['site.pages.tipsTricks'], TipsComposer::class);
        view()->composer(['site.partials.header', 'site.partials.headerClean', 'site.partials.mobile.stickyNavigation', 'site.partials.feedbackCompanyReview', 'site.tracking.richSnippets'], ScoreComposer::class);

        view()->composer(['site.pages.message'], PostComposer::class.'@message');
        view()->composer(['site.pages.message'], QuestionCategoriesComposer::class.'@message');

        // Load cookie config into view
        view()->composer('site.partials.cookieIndex', function (View $view)
        {
            // Get config
            $cookieConsentConfig = config('cookie-consent');
            // Check if cookie exists
            $alreadyConsentedWithCookies = Cookie::has($cookieConsentConfig['cookie_name']);
            // Return with configuration
            $view->with(compact('alreadyConsentedWithCookies', 'cookieConsentConfig'));
        });

        // Calculate how many houses as sold
        view()->composer(['site.pages.startSale', 'site.partials.header', 'site.partials.headerClean'], PropertiesSoldComposer::class);
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}