Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
3 | function getUniqueDropdownName($parent_id = null, $entagle = null) |
||
4 | { |
||
5 | $randomNums = Str::random(15); |
||
6 | $uniqueID = 'searchableDropdownData_'.$randomNums; |
||
7 | if($parent_id){ |
||
8 | $sess_id = "{$parent_id}_{$entagle}"; |
||
9 | // TODO : somehow cleanup session at some point ???? |
||
10 | if(session()->has($sess_id)){ |
||
11 | $uniqueID = session()->get($sess_id); |
||
12 | } else { |
||
13 | session()->put($sess_id, $uniqueID); |
||
14 | } |
||
15 | } |
||
16 | return $uniqueID; |
||
17 | } |
||
42 |