<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

use App\User;
use App\Slider;
use App\Service;
use App\Page;
use App\Question;
use Notification;
use App\Notifications\ArticlesNotification;
use Config;
use Illuminate\View\View;

class HomeController extends Controller
{
    private $view = 'web.pages.';
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        // $this->middleware('auth')->except('lang');
    }

    /**
     * Show the application dashboard.
     * @return View
     */
    public function index(): View
    {
        $time = .2;
        $right = Service::take(3)->get();
        $left = Service::skip(3)->take(3)->get();
        $questions = Question::cursor();
        $about = Page::find(9);
        $service = Page::find(10);
        $question = Page::find(11);
        $contact = Page::find(12);
        $intro = Page::find(8);
        return view($this->view.'index',compact('questions','time','right','left','about','intro','service','question','contact'));
    }
}
