Conditions | 5 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
11 | public function __construct($identifier = null) |
||
12 | { |
||
13 | if (! is_null($identifier)) { |
||
14 | if (is_string($identifier) || is_int($identifier)) { |
||
15 | $this->payslip = config('open-payroll.models.payslip')::query() |
||
16 | ->with('earnings', 'deductions', 'payroll', 'employee', 'employee.salary') |
||
17 | ->whereId($identifier) |
||
18 | ->orWhere('hashslug', $identifier) |
||
19 | ->firstOrFail(); |
||
20 | } |
||
21 | |||
22 | if (is_object($identifier)) { |
||
23 | $this->payslip($identifier); |
||
24 | } |
||
59 |