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

Participants Import

{{--

Hello! This is Sandbox

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

@if (!empty($data)) @php $error_array = array() @endphp @foreach ($data as $key => $new_data) {{-- @if (ParticipantsController::check_student_id(trim($new_data->student)) != 0 ) @php $error_array[] = 'Check the ID of Student ID.' @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) @endforeach @endif
    No. Student ID Participants Hours
    {{ ++$key }} {{ $new_data->student }} {{ $new_data->participated }} {{ substr($new_data->hours, 0, 5) }}
    @endif
    @include('layouts.footer') @endsection