@extends('layouts.base_portal')
@section('inner_content')
    <div class="container">
        <div class="panel panel-primary">
        <div class="panel-body">
            <p>Session: {{ session('image') }}</p>
            <p>check1: {{ session('check1') }}</p>
            <p>check2: {{ session('check2') }}</p>
            <p>check3: {{ session('check3') }}</p>
            @if ($message = session('success'))
            <div class="alert alert-success alert-block">
                <button type="button" class="close" data-dismiss="alert">×</button>
                    <strong>{{ $message }}</strong>
            </div>
            <img src="{{ route('aws.image.displayImage', session('image')) }}" style="width: 400px">
            @endif

            @if (count($errors) > 0)
                <div class="alert alert-danger">
                    <strong>Whoops!</strong> There were some problems with your input.
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif


            <form action="{{ route('aws.image.upload.post') }}" method="POST" enctype="multipart/form-data">
                @csrf
                <div class="row">
                    <div class="col-md-6">
                        <input type="file" name="image" class="form-control">
                    </div>

                    <div class="col-md-6">
                        <button type="submit" class="btn btn-success">Upload</button>
                    </div>
                </div>
            </form>
        </div>
        </div>
    </div>
@endsection
