<?php
/**
 * Created by PhpStorm.
 * User: Avangard
 * Date: 27.8.2018
 * Time: 19:44
 */

namespace App\Http\ViewComposers;

use Illuminate\View\View;


class GeneralComposer
{
    public function __construct()
    {

    }


    /**
     * Bind data to the view.
     *
     * @param  View  $view
     * @return void
     */
    public function compose(View $view)
    {
        $config = collect(\DB::select("SELECT `company_name`, `address`, `logo`, `tel1`, `tel2`, `tel3`, `fax`, `cel_number`, `web`, `email`, `wtime`, `def_desc`,`title_sufix`,`ga`, `gmap` FROM `config` WHERE `id` = 1"))->first();

        $view->with('config', $config);
    }
}