<?php

namespace Wave\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;

class HomeController extends Controller
{

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
    	// if(setting('auth.dashboard_redirect', true) != "null"){
    		if(!Auth::guest()){
    			// return redirect('dashboard');
                return redirect(Auth::user()->getRedirectRoute());
    		}
    	// }
        return redirect(route('login'));

        $seo = [

            'title'         => setting('site.title', 'Laravel Wave'),
            'description'   => setting('site.description', 'Software as a Service Starter Kit'),
            'image'         => url('/og_image.png'),
            'type'          => 'website'

        ];

        return view('theme::home', compact('seo'));
    }
}
