-
Notifications
You must be signed in to change notification settings - Fork 2
/
CompanyController.php
50 lines (43 loc) · 1.1 KB
/
CompanyController.php
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
49
50
<?php
namespace App\Http\Controllers\Hub;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\View\View;
class CompanyController extends Controller
{
/**
* Returns the landing page of the conference hub
* And passes the information needed for the statistic graphs
*/
public function dashboard()
{
return view('myhub.home');
}
/**
* Returns the inner details of the company
*
* @return View
*/
public function details()
{
$company = Auth::user()->company;
if (!$company) {
abort(403);
}
return view('myhub.company.details', compact('company'));
}
/**
* Returns the requests that the company has made - booth and sponsorship
*
* @return View
*/
public function requests(): View
{
$company = Auth::user()->company;
if (!$company || Auth::user()->cannot('viewRequests', $company)) {
abort(403);
}
return view('myhub.company.requests', compact('company'));
}
}