Customer Management
{{ session('success') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
@if ($errors->has('phno'))
{{ $errors->first('phno') }}
@endif
@if (session('trycache'))
{{ session('trycache') }}
@endif
{{-- Permission --}}
@php
$choosePermission = [];
if (auth()->user()->permission) {
$decodedPermissions = json_decode(auth()->user()->permission, true);
if (json_last_error() === JSON_ERROR_NONE) {
$choosePermission = $decodedPermissions;
}
}
@endphp
{{-- End Permission --}}
@if (in_array('Customer Register', $choosePermission) || auth()->user()->is_admin == '1')
@endif
Customer Table
No. | Name | Phone Number | Customer Type | Location | Address | Action |
---|---|---|---|---|---|---|
{{ $no }} | {{ $customer->name }} | {{ $customer->phno }} | {{ $customer->type }} | @foreach ($branchs as $branch) @if ($branch->id == $customer->branch) {{ $branch->name }} @endif @endforeach | {{ $customer->address }} |
@if (in_array('Customer Edit', $choosePermission) || auth()->user()->is_admin == '1')
@endif
@if (in_array('Customer Delete', $choosePermission) || auth()->user()->is_admin == '1')
@endif
@if (in_array('Customer Credit', $choosePermission) || auth()->user()->is_admin == '1')
Credit
@endif
|