<?php

namespace App\Http\Controllers\Web;

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

use App\User;
use App\Slider;
use App\Association;
use App\Page;
use App\Method;
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
    {
        $settings= settings();
        $methods = Method::paginate(3);
        $about = Page::first();
        $charity = Association::cursor();
        $sliders = Slider::cursor();
        
        return view($this->view.'index', compact('methods', 'about','charity','sliders'));
    }
}
