@php use App\Http\Controllers\UserController; @endphp @extends('layouts.master') @section('title', 'Officer Import') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.header')

Officer Import

{{--

Hello! This is Sandbox

--}}
Officer Import
{{-- Add --}}
{{ csrf_field() }}
File Import :
(.xlsx only)

@if (!empty($data)) @php $error_array = array() @endphp @foreach ($data as $key => $new_data) @if (UserController::check_username(trim($new_data->officer_username)) == 1) @php $error_array[] = 'Check the name of Username.' @endphp @endif @if (UserController::check_firstname(trim($new_data->officer_firstname)) == 1) @php $error_array[] = 'Check the name of Firstname.' @endphp @endif {{-- @if (UserController::check_lastname(trim($new_data->officer_lastname)) == 1) @php $error_array[] = 'Check the name of Lastname.' @endphp @endif --}} @if (UserController::check_school_division(trim($new_data->officer_school_division)) == 0) @php $error_array[] = 'Check the name of School/Division.' @endphp @endif @if (UserController::check_curriculum(trim($new_data->officer_curriculum)) == 0) @php $error_array[] = 'Check the name of Curriculum.' @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))
    @if (!empty($data)) @foreach ($data as $key => $new_data) @endforeach @endif
    No. Username Name E-mail School/Division Curriculum Status
    {{ ++$key }} @if (UserController::check_username(trim($new_data->officer_username)) == 1) {{ $new_data->officer_username }} @else {{ $new_data->officer_username }} @endif @if (UserController::check_firstname(trim($new_data->officer_firstname)) == 1) {{ $new_data->officer_firstname }} {{ $new_data->officer_lastname }} {{-- @elseif(UserController::check_lastname(trim($new_data->officer_lastname)) == 1) {{ $new_data->officer_firstname }} {{ $new_data->officer_lastname }} --}} @else {{ $new_data->officer_firstname }} {{ $new_data->officer_lastname }} @endif {{ $new_data->officer_email }} @if (UserController::check_school_division(trim($new_data->officer_school_division)) == 0) {{ $new_data->officer_school_division }} @else {{ $new_data->officer_school_division }} @endif @if (UserController::check_curriculum(trim($new_data->officer_curriculum)) == 0) {{ $new_data->officer_curriculum }} @else {{ $new_data->officer_curriculum }} @endif {{ $new_data->officer_status }}
    @endif
    @include('layouts.footer') @endsection