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

Committee Import

{{--

Hello! This is Sandbox

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

@if (!empty($data)) @php $error_array = array() @endphp @foreach ($data as $key => $new_data) @if (CommitteeController::check_academic(trim($new_data->academic_year)) == 0) @php $error_array[] = 'Check the year of Academic Year.' @endphp @endif @if (CommitteeController::check_student_id(trim($new_data->student_id)) == 0) @php $error_array[] = 'Check ID of Student ID.' @endphp @endif {{-- @if (CommitteeController::check_student_name(trim($new_data->name)) == 0) @php $error_array[] = 'Check the name of Student Name.' @endphp @endif --}} @if (CommitteeController::check_position(trim($new_data->position)) == 0) @php $error_array[] = 'Check the position.' @endphp @endif @if (CommitteeController::check_club(trim($new_data->club)) == 0) @php $error_array[] = 'Check the Club.' @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) {{-- @php $cut_str2 = substr($new_data->activity_year, 2); $get_year = DB::table('academic_year') ->where('academic_year',$new_data->activity_year) ->first(); @endphp --}} {{-- --}} @endforeach @endif
    No. Academic Year Student ID NamePosition Club
    {{ ++$key }} @if(CommitteeController::check_academic(trim($new_data->academic_year)) == 0) {{ $new_data->academic_year }} @else {{ $new_data->academic_year }} @endif @if(CommitteeController::check_student_id(trim($new_data->student_id)) == 0) {{ $new_data->student_id }} @else {{ $new_data->student_id }} @endif {{ $new_data->name }} @if(CommitteeController::check_position(trim($new_data->position)) == 0) {{ $new_data->position }} @else {{ $new_data->position }} @endif @if(CommitteeController::check_club(trim($new_data->club)) == 0) {{ $new_data->club }} @else {{ $new_data->club }} @endif
    @endif
    @include('layouts.footer') @endsection