@php use App\Http\Controllers\SchoolController; use Carbon\Carbon; @endphp @extends('layouts.master') @section('title', 'Import School') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.header') @include('layouts.header-sub') Import School {{ csrf_field() }} File Import : (.xlsx only) sample file Browse @if (!empty($data)) @php $error_array = array() @endphp @foreach ($data as $key => $new_data) @if (SchoolController::check_grade(trim($new_data->school_grade_name)) == 0) @php $error_array[] = 'Check the name of grade name.' @endphp @endif @endforeach @if (count($error_array) == 0) @else @php $error_array = array_unique($error_array) @endphp @foreach ($error_array as $error) {{ $error }} @endforeach @endif @endif @if (isset($show)) No. School Name School Grade @if (!empty($data)) @foreach ($data as $key => $new_data) {{ ++$key }} {{ $new_data->school_name }} @if ($new_data->grade_found) {{ $new_data->school_grade_name }} @else Not Found ({{ $new_data->school_grade_name }}) @endif @endforeach @endif @endif @include('layouts.footer') @endsection