@extends('admin.layouts.app') @section('content')

{{ __('Manage Fields')}}

@include('admin.message')
@if(!empty($fields))
{{csrf_field()}}
@endif
@csrf
{{__("Add new field")}}
@include('User::admin.role.verifyFieldsForm')
{{ __('All Fields')}}
@foreach($fields as $id=>$row) @endforeach
{{ __('ID')}} {{ __('Icon')}} {{ __('Name')}} {{ __('Type')}} {{ __('For roles')}} {{ __('Order')}} {{ __('Required')}}
{{$id}} {{$row['name']}} {{verify_type_to($row['type'],'name')}} @php if(!empty($row['roles'])){ $roles = \Spatie\Permission\Models\Role::query()->whereIn('id',$row['roles'])->get(); if(!empty($roles)) { echo implode(", ",$roles->pluck('name')->toArray()); } } @endphp {{$row['order'] ?? 0}} {{$row['required'] ? __("Yes") : 'No'}} {{__('Edit')}}
@endsection