<?php

namespace App\Http\Controllers\Web;


use Illuminate\Http\Request;
use Illuminate\View\View;
use App\Http\Controllers\Controller;
use App\Imports\DataImport;
use Maatwebsite\Excel\Facades\Excel;

class HomeController extends Controller
{
    private $view = 'web.pages.home.';
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    
    public function index()
    {
        return view($this->view.'index');
    }
    
    public function store(Request $request)
    {
        Excel::import(new DataImport, $request->file);
    }
}
