@php $edit = !is_null($dataTypeContent->getKey()); $add = is_null($dataTypeContent->getKey()); $user = \Illuminate\Support\Facades\Auth::id(); $user_role = \Illuminate\Support\Facades\Auth::user()->role_id; $userID = (int)$user; //sort cars if($user_role != 3) $cars = \App\Car::all(); else $cars = \App\Car::where('user_id',$userID)->get(); $selectedCar = ''; if($edit) $selectedCar = $dataTypeContent->getAttribute('car_id'); @endphp @extends('voyager::master') @section('page_title', __('voyager::generic.'.(isset($dataTypeContent->id) ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('css') @stop @section('page_header')

{{ __('voyager::generic.'.(isset($dataTypeContent->id) ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular') }}

@stop @section('content')
@if(isset($dataTypeContent->id)) {{ method_field("PUT") }} @endif {{ csrf_field() }}
{{--
--}} @if (count($errors) > 0)
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
{{ csrf_field() }}
@stop @section('javascript') @stop