@extends('admin.layouts') @section('title', 'Employee') @section('header') @endsection @section('content')

Employee

Add Employee
@csrf
{{--
@if (auth()->user()->role === 'admin') @elseif (in_array(auth()->user()->role, ['sakthi', 'smart_world', 'smart_world_gift', 'yoga_naturals'])) @php $roleToBranchName = [ 'sakthi' => 'Sakthi Super Mart', 'smart_world' => 'SMARTWORLD', 'smart_world_gift' => 'SMARTWORLD - Stationary & Gifts', 'yoga_naturals' => 'Yogaa Naturals', ]; $userRole = auth()->user()->role; $branchName = $roleToBranchName[$userRole] ?? null; $userBranch = $branches->firstWhere('branch_name', $branchName); @endphp @else @endif
--}}
@if (auth()->user()->role === 'admin') @else @endif
@error('name') {{ $message }} @enderror
@error('email') {{ $message }} @enderror
@error('password') {{ $message }} @enderror
@error('designation') {{ $message }} @enderror
@error('phone') {{ $message }} @enderror
@error('address') {{ $message }} @enderror
Employee List
@forelse ($employees as $index => $employee) @empty @endforelse
S/N Date Branch Designation Name Phone Address Action
{{ $index + 1 }} {{ \Carbon\Carbon::parse($employee->created_at)->format('d-M-Y') }} {{ $employee->branch }} {{ $employee->designation }} {{ $employee->name }} {{ $employee->phone }} {{ $employee->address }} Edit
No employees found.
@foreach ($employees as $employeeItem) @endforeach
@endsection @section('footer') @endsection