<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;
use Illuminate\Support\Facades\Auth;

use App\Parametro;

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

    public function boot()
    {


        view()->composer('*', function ($view) {
            $this->Globales($view);
        });

    }

    private function Globales($view)
    {

/*

        if (\Auth::user() == null) {
            return;
        }*/



        $eslogan = Parametro::where('clave', 'eslogan')->get()->first();

        $view->with('stEslogan', $eslogan->valor);

    }
}
