-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEventCheckinController.php
More file actions
41 lines (34 loc) · 1.02 KB
/
EventCheckinController.php
File metadata and controls
41 lines (34 loc) · 1.02 KB
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
<?php
namespace App\Http\Controllers;
use App\Models\Event;
use Illuminate\Http\Request;
use Laravel\Jetstream\Jetstream;
class EventCheckinController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(Request $request)
{
$team = $request->user()->currentTeam;
$events = Event::where('team_id', $team->id)
->get()
->setVisible([
'uuid', 'name', 'event_date'
]);
return Jetstream::inertia()
->render($request, 'ScanTickets/Index',
compact('team', 'events'));
}
/**
* Display the specified resource.
*/
public function show(Request $request, string $event_uuid)
{
$event = Event::where('uuid', $event_uuid)
->firstOrFail();
return Jetstream::inertia()
->render($request, 'ScanTickets/Show',
compact('event'));
}
}