app/Http/Controllers/V1/MainController.php
// chamar view login se nao estiver logado
chamar view login se nao estiver logado
chamar view login se nao estiver logado
public function login()
    {
        if ($this->checksessao()) {
            return redirect()->route('index');
        }
        return view('login');
    }
public function login ( ) { if ( $ this -> checksessao ( ) ) { return redirect ( ) -> route ( 'index' ) ; } return view ( 'login' ) ; }
chamar view login se nao estiver logado
chamar view login se nao estiver logado