@extends('layouts.template') @section('template') UNIT Home Dashboard Unit Add New Unit Srl Name Action @if(isset($units)) @foreach($units as $key => $data) {{ ++$key }} {{ $data->name }} @if(Auth::user()->role == 'admin') Edit {{ method_field('DELETE') }} {{ csrf_field() }} Delete @endif @endforeach @endif @if(Session::has('success')) {{Session::get('success')}} @php Session::forget('success'); @endphp @endif @if(Session::has('update')) {{Session::get('update')}} @php Session::forget('update'); @endphp @endif @if(Session::has('delete')) {{Session::get('delete')}} @php Session::forget('delete'); @endphp @endif × Add {{ csrf_field() }} Unit Name @if($errors->has('name')) {{ $errors->first('name')}} @endif × Update {{ method_field('PUT') }} {{ csrf_field() }} Unit Name @if($errors->has('name')) {{ $errors->first('name')}} @endif @endsection