@extends('layouts.admin')

@section('content')


<?php
    $type = Request::segment('2');
    $bank_id = Request::segment('3');

?>

        <!-- Content Wrapper. Contains car content -->
        <div class="content-wrapper" style="margin-left:10px !important;">
            <!-- Content Header (car header) -->
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1>انشاء ملف جديد</h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><a href="#">الرئيسية</a></li>
                                <li class="breadcrumb-item active">ادارة النظام</li>
                            </ol>
                        </div>
                    </div>
                </div><!-- /.container-fluid -->
            </section>









            <!-- Main content -->
            <section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="success">
                            @if(session()->has('success'))
                                <div class="alert alert-success">
                                    {{ session()->get('success') }}
                                </div>
                            @endif

                                <h2 id="success" style="color: green;
                                font-weight: bolder;">

                                </h2>


                        </div>
                        <form action="{{url('/transfer')}}" method="post" enctype="multipart/form-data">
                            @csrf



                        <div class="form-group">
                            <label for="account_from">  تحويل من حساب  </label>

                            <select name="account_from" class="form-control">
                                <?php
                                $accounts = \App\banks::where('id','<>','1')->get();
                                ?>
                                @foreach($accounts as $r)
                                <option value="{{$r->id}}">{{$r->bank}}</option>
                                @endforeach
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="account_to">  تحويل   الى حساب   </label>

                            <select name="account_to" class="form-control">
                                <?php
                                $accounts = \App\banks::where('id','<>','1')->get();
                                ?>
                                @foreach($accounts as $r)
                                <option value="{{$r->id}}">{{$r->bank}}</option>
                                @endforeach
                            </select>
                        </div>


                        <div class="form-group">
                            <label for="amount">   المبلغ     </label>
                            <input type="number" name="amount" id="amount" class="form-control" id="amount" placeholder="Enter amount">
                            @error('title') {{ $message }} @enderror

                        </div>

                        <input type="hidden" value="transfer" name="payment_method">

                        <div class="form-group">
                            <label for="notes">   ملاحظات      </label>
                            <textarea name="notes" class="form-control"></textarea>
                        </div>

  
                        <div class="card-footer">
                        <button class="btn btn-primary" >اضافة</button>
                        
                        </div>


                        </form>


                    </div>
                    <!-- /.col-->
                </div>
                <!-- ./row -->
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->





@endsection
