<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        view()->composer('layouts.header', function ($view) {
            $view->with('homepage', \App\Homepage::homepage());
        });

        view()->composer('layouts.footer', function ($view) {
            $view->with('homepage', \App\Homepage::homepage());
        });
    }
}
