Trying to access array offset on null value
P粉616383625
P粉616383625 2024-03-29 14:21:30
0
1
462

<td> {{ $item->salary }} </td>
@if($item['advance']['advance_salary'] == NULL )
    <p>No Advance</p>
@else
    {{ $item['advance']['advance_salary'] }}
@endif
</td>
<td>
    @php
        $amount = $item->salary - $item['advance']['advance_salary'];
    @endphp
    <strong style="color: #fff;"> {{ round($amount) }} </strong>
 </td>

An attempt was made to access the array offset of a value of type null Running these commands

composer update 

php artisan cache:clear <br>
php artisan config:clear<br>
php artisan view:clear

P粉616383625
P粉616383625

reply all(1)
P粉315680565

In some places you expect $item to be an object ($item->salary), in other places you expect $item to be It is an array ($item['advance']['advance_salary']). Fix them first, you may fix errors in the process.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template