Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function getData() |
||
15 | { |
||
16 | // Check if all required previous inputs are present |
||
17 | // Else sent user back to where he has to start/comence |
||
18 | if (!session()->has('event')) { |
||
19 | return redirect()->route('ts.events'); |
||
20 | } |
||
21 | if (!session()->has('tickets')) { |
||
22 | return redirect()->route('ts.seatmap', ['event' => session('event')->id]); |
||
23 | } |
||
24 | |||
25 | $data = []; |
||
26 | if (session()->has('customerData')) { |
||
27 | $data = session('customerData'); |
||
28 | } |
||
29 | |||
30 | // data is structured like the form attributes in the view |
||
31 | return view('ticketshop.customer-data', ['data' => $data]); |
||
32 | } |
||
39 | } |