1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware(['auth','verified']);
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Contracts\Support\Renderable
*/
public function index()
{
if(Auth::check()){
if(Auth::user()->tipo == 'administrador'){
return view('administrador.index');
}
else if (Auth::user()->tipo == 'administradorResponsavel') {
return view('administradorResponsavel.index');
}
else if (Auth::user()->tipo == 'proponente') {
return view('proponente.index');
}
else if (Auth::user()->tipo == 'participante') {
return view('participante.index');
}
}
//
return view('home');
}
public function downloadArquivo(Request $request){
return response()->download(storage_path('app/'.$request->file));
}
}