1 | <?php |
||
26 | class HomeController extends Controller |
||
27 | { |
||
28 | /** |
||
29 | * Public issues view. |
||
30 | * |
||
31 | * @param User $user |
||
32 | * @param Project $project |
||
33 | * |
||
34 | * @return \Illuminate\View\View |
||
35 | */ |
||
36 | 4 | public function getIssues(User $user, Project $project) |
|
44 | |||
45 | /** |
||
46 | * User dashboard. |
||
47 | * |
||
48 | * @return \Illuminate\View\View |
||
49 | */ |
||
50 | 10 | public function getDashboard() |
|
51 | { |
||
52 | 10 | return view('index.dashboard', [ |
|
53 | 10 | 'projects' => $this->auth->user()->projectsWidthActivities(Project::STATUS_OPEN)->get(), |
|
54 | 10 | ]); |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * Logout user and redirect to login page. |
||
59 | * |
||
60 | * @return \Illuminate\Http\RedirectResponse |
||
61 | */ |
||
62 | 1 | public function getLogout() |
|
63 | { |
||
64 | 1 | $this->auth->logout(); |
|
65 | |||
66 | 1 | return redirect('/')->with('message', trans('tinyissue.loggedout')); |
|
67 | } |
||
68 | |||
69 | /** |
||
70 | * Login page. |
||
71 | * |
||
72 | * @param LoginForm $form |
||
73 | * |
||
74 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View |
||
75 | */ |
||
76 | 16 | public function getIndex(LoginForm $form) |
|
84 | |||
85 | /** |
||
86 | * Attempt to log user in or redirect to login page with error. |
||
87 | * |
||
88 | * @param FormRequest\Login $request |
||
89 | * |
||
90 | * @return \Illuminate\Http\RedirectResponse |
||
91 | */ |
||
92 | 8 | public function postSignin(FormRequest\Login $request) |
|
119 | } |
||
120 |