Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 21 | protected function returnBack($data) |
|
36 | { |
||
37 | // Prevent infinite loop |
||
38 | 21 | if (back()->getTargetUrl() === url()->current()) { |
|
39 | 1 | Log::info('Request loop: '.back()->getTargetUrl()); |
|
40 | |||
41 | 1 | return redirect(route('room.index'))->with($data); |
|
42 | } |
||
43 | |||
44 | 20 | return back()->with($data); |
|
45 | } |
||
53 |