@extends('layouts.adminlayout') @section('content')
{{ __('User Edit') }}
@csrf
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@if ($errors->has('email')) {{ $errors->first('email') }} @endif
@if ($errors->has('dept')) {{ $errors->first('dept') }} @endif
@if ($errors->has('dept')) {{ $errors->first('dept') }} @endif
@if($user->role != -1)
{{ __('Add Areas For User') }}
@csrf
@if ($errors->has('unit_no')) {{ $errors->first('unit_no') }} @endif
@if ($errors->has('plant_id')) {{ $errors->first('plant_id') }} @endif

Area List

@if(!empty($user->area_id)) @foreach(json_decode($user->area_id) as $index => $area) @php $a = App\Models\Plant::find($area); @endphp @endforeach @endif
# Plant Action
{{ $index + 1 }} {{ $a->name }}
Delete
@endif
@endsection